Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rspec looking for different path pattern #211

Open
ScotterC opened this issue Sep 24, 2012 · 1 comment
Open

Rspec looking for different path pattern #211

ScotterC opened this issue Sep 24, 2012 · 1 comment

Comments

@ScotterC
Copy link

Spork 1.0.0.rc3 starts up fine.

With rspec 2.11.1, it fails to get files to run:

Exception encountered: #<NoMethodError: undefined method `split' for #Rake::FileList:0x007ff801843108>

.rvm/gems/ruby-1.9.3-p194/gems/rspec-core-2.11.1/lib/rspec/core/configuration.rb:806:in `get_files_to_run'
.rvm/gems/ruby-1.9.3-p194/gems/rspec-core-2.11.1/lib/rspec/core/configuration.rb:504:in `files_or_directories_to_run='
.rvm/gems/ruby-1.9.3-p194/gems/rspec-core-2.11.1/lib/rspec/core/configuration_options.rb:20:in `block in configure'
.rvm/gems/ruby-1.9.3-p194/gems/rspec-core-2.11.1/lib/rspec/core/configuration_options.rb:19:in `each'
.rvm/gems/ruby-1.9.3-p194/gems/rspec-core-2.11.1/lib/rspec/core/configuration_options.rb:19:in `configure'
.rvm/gems/ruby-1.9.3-p194/gems/rspec-core-2.11.1/lib/rspec/core/command_line.rb:21:in `run'
.rvm/gems/ruby-1.9.3-p194/gems/spork-1.0.0rc3/lib/spork/test_framework/rspec.rb:11:in `run_tests'
.rvm/gems/ruby-1.9.3-p194/gems/spork-1.0.0rc3/lib/spork/run_strategy/forking.rb:13:in `block in run'
.rvm/gems/ruby-1.9.3-p194/gems/spork-1.0.0rc3/lib/spork/forker.rb:21:in `block in initialize'
.rvm/gems/ruby-1.9.3-p194/gems/spork-1.0.0rc3/lib/spork/forker.rb:18:in `fork'
.rvm/gems/ruby-1.9.3-p194/gems/spork-1.0.0rc3/lib/spork/forker.rb:18:in `initialize'
.rvm/gems/ruby-1.9.3-p194/gems/spork-1.0.0rc3/lib/spork/run_strategy/forking.rb:9:in `new'
.rvm/gems/ruby-1.9.3-p194/gems/spork-1.0.0rc3/lib/spork/run_strategy/forking.rb:9:in `run'
.rvm/gems/ruby-1.9.3-p194/gems/spork-1.0.0rc3/lib/spork/server.rb:48:in `run'
.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/drb/drb.rb:1548:in `perform_without_block'
.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/drb/drb.rb:1508:in `perform'
.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/drb/drb.rb:1586:in `block (2 levels) in main_loop'
.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/drb/drb.rb:1582:in `loop'
.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/drb/drb.rb:1582:in `block in main_loop'

Rspec works fine without rspec however. It normall would have input of '*_/__spec.rb' to split.

Relevant Code:
rspec-core-2.11.1/lib/rspec/core/configuration.rb:806

def get_files_to_run(paths)
  patterns = pattern.split(",")

pattern is Rake::FileList, if I just convert it to an array, code works fine.

patterns = pattern.to_a.split(",")

A bit of a monkey patch but works for now.

@ScotterC
Copy link
Author

Found the issue.

My spec_helper was overriding the pattern

config.pattern = FileList[config.pattern].exclude('requests')

Feel free to close.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant