rspec / rspec-core

RSpec runner and formatters
http://rspec.info
MIT License
1.22k stars 763 forks source link

2.0.0.beta.16 breaks with Spork #61

Closed mhartl closed 14 years ago

mhartl commented 14 years ago

Running the rspec script (or autotest) with a Spork server works fine in 2.0.0.beta.15, but it breaks in 2.0.0.beta.16. The error when running rspec is as follows:

Exception encountered: #<NoMethodError: undefined method `configure' for ["--color", "spec"]:Array>
backtrace:
/Users/mhartl/.rvm/gems/ruby-1.9.2-rc1@sample_app/gems/rspec-core-2.0.0.beta.16/lib/rspec/core/command_line.rb:11:in `run'
/Users/mhartl/.rvm/gems/ruby-1.9.2-rc1@sample_app/gems/rspec-core-2.0.0.beta.16/lib/rspec/monkey/spork/test_framework/rspec.rb:4:in `run_tests'
/Users/mhartl/.rvm/gems/ruby-1.9.2-rc1@sample_app/gems/spork-0.8.4/lib/spork/run_strategy/forking.rb:13:in `block in run'
/Users/mhartl/.rvm/gems/ruby-1.9.2-rc1@sample_app/gems/spork-0.8.4/lib/spork/forker.rb:21:in `block in initialize'
/Users/mhartl/.rvm/gems/ruby-1.9.2-rc1@sample_app/gems/spork-0.8.4/lib/spork/forker.rb:18:in `fork'
/Users/mhartl/.rvm/gems/ruby-1.9.2-rc1@sample_app/gems/spork-0.8.4/lib/spork/forker.rb:18:in `initialize'
/Users/mhartl/.rvm/gems/ruby-1.9.2-rc1@sample_app/gems/spork-0.8.4/lib/spork/run_strategy/forking.rb:9:in `new'
/Users/mhartl/.rvm/gems/ruby-1.9.2-rc1@sample_app/gems/spork-0.8.4/lib/spork/run_strategy/forking.rb:9:in `run'
/Users/mhartl/.rvm/gems/ruby-1.9.2-rc1@sample_app/gems/spork-0.8.4/lib/spork/server.rb:47:in `run'
/Users/mhartl/.rvm/rubies/ruby-1.9.2-rc1/lib/ruby/1.9.1/drb/drb.rb:1558:in `perform_without_block'
/Users/mhartl/.rvm/rubies/ruby-1.9.2-rc1/lib/ruby/1.9.1/drb/drb.rb:1518:in `perform'
/Users/mhartl/.rvm/rubies/ruby-1.9.2-rc1/lib/ruby/1.9.1/drb/drb.rb:1592:in `block (2 levels) in main_loop'
/Users/mhartl/.rvm/rubies/ruby-1.9.2-rc1/lib/ruby/1.9.1/drb/drb.rb:1588:in `loop'
/Users/mhartl/.rvm/rubies/ruby-1.9.2-rc1/lib/ruby/1.9.1/drb/drb.rb:1588:in `block in main_loop'

When running autotest, it's slightly different:

Exception encountered: #<NoMethodError: undefined method `configure' for #<Array:0x295fa68>>
backtrace:
/Users/mhartl/.rvm/gems/ruby-1.9.2-rc1@sample_app/gems/rspec-core-2.0.0.beta.16/lib/rspec/core/command_line.rb:11:in `run'
/Users/mhartl/.rvm/gems/ruby-1.9.2-rc1@sample_app/gems/rspec-core-2.0.0.beta.16/lib/rspec/monkey/spork/test_framework/rspec.rb:4:in `run_tests'
/Users/mhartl/.rvm/gems/ruby-1.9.2-rc1@sample_app/gems/spork-0.8.4/lib/spork/run_strategy/forking.rb:13:in `block in run'
/Users/mhartl/.rvm/gems/ruby-1.9.2-rc1@sample_app/gems/spork-0.8.4/lib/spork/forker.rb:21:in `block in initialize'
/Users/mhartl/.rvm/gems/ruby-1.9.2-rc1@sample_app/gems/spork-0.8.4/lib/spork/forker.rb:18:in `fork'
/Users/mhartl/.rvm/gems/ruby-1.9.2-rc1@sample_app/gems/spork-0.8.4/lib/spork/forker.rb:18:in `initialize'
/Users/mhartl/.rvm/gems/ruby-1.9.2-rc1@sample_app/gems/spork-0.8.4/lib/spork/run_strategy/forking.rb:9:in `new'
/Users/mhartl/.rvm/gems/ruby-1.9.2-rc1@sample_app/gems/spork-0.8.4/lib/spork/run_strategy/forking.rb:9:in `run'
/Users/mhartl/.rvm/gems/ruby-1.9.2-rc1@sample_app/gems/spork-0.8.4/lib/spork/server.rb:47:in `run'
/Users/mhartl/.rvm/rubies/ruby-1.9.2-rc1/lib/ruby/1.9.1/drb/drb.rb:1558:in `perform_without_block'
/Users/mhartl/.rvm/rubies/ruby-1.9.2-rc1/lib/ruby/1.9.1/drb/drb.rb:1518:in `perform'
/Users/mhartl/.rvm/rubies/ruby-1.9.2-rc1/lib/ruby/1.9.1/drb/drb.rb:1592:in `block (2 levels) in main_loop'
/Users/mhartl/.rvm/rubies/ruby-1.9.2-rc1/lib/ruby/1.9.1/drb/drb.rb:1588:in `loop'
/Users/mhartl/.rvm/rubies/ruby-1.9.2-rc1/lib/ruby/1.9.1/drb/drb.rb:1588:in `block in main_loop'

The contents of the .rspec file in both cases are the same:

--colour
--drb
dchelimsky commented 14 years ago

CommandLine can accept an array of command line options and build a ConfigurationOptions object from it.

Closed by 96166e5caa8ff5cd00c4ba292a37bed55f880886.

mhartl commented 14 years ago

Man, you're fast. I applied the patch by hand and it works great. Thanks!