Skip to content
This repository

Rspec looking for different path pattern #211

Open
ScotterC opened this Issue September 24, 2012 · 1 comment

1 participant

Scott Carleton
Scott Carleton

Spork 1.0.0.rc3 starts up fine.

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

Exception encountered: #>

.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.

Scott Carleton

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
Something went wrong with that request. Please try again.