I use Cucumber to test my Rails app, and thanks to a running Spork I don't have to start the whole Rails app every time I run a scenario.
I have set the TM_CUCUMBER_OPTS
to --drb
within TextMate, which works fine, but it results in awkward formatting of the results: it's only text, not HTML anymore.
Any way to fix that? I tried --format=html, but this results in:
Running: /Users/josh/.rvm/bin/rvm-auto-ruby /Users/josh/Documents/Work/Sientia/iq/script/cucumber
/Users/josh/Documents/Work/Sientia/iq/features/authorization/sign_out.feature --drb --format=html
Using the default profile...
Disabling profiles...
Exception encountered: #<RuntimeError: All but one formatter must use --out, only one can print to each stream (or STDOUT)>
backtrace:
/Users/josh/.rvm/gems/ruby-1.9.3-p0@iq/gems/cucumber-1.2.1/lib/cucumber/cli/configuration.rb:198:in `arrange_formats'
/Users/josh/.rvm/gems/ruby-1.9.3-p0@iq/gems/cucumber-1.2.1/lib/cucumber/cli/configuration.rb:26:in `parse!'
/Users/josh/.rvm/gems/ruby-1.9.3-p0@iq/gems/cucumber-1.2.1/lib/cucumber/cli/main.rb:55:in `configuration'
/Users/josh/.rvm/gems/ruby-1.9.3-p0@iq/gems/cucumber-1.2.1/lib/cucumber/cli/main.rb:63:in `run_drb_client'
/Users/josh/.rvm/gems/ruby-1.9.3-p0@iq/gems/cucumber-1.2.1/lib/cucumber/cli/main.rb:34:in `execute!'
/Users/josh/.rvm/gems/ruby-1.9.3-p0@iq/gems/spork-0.9.2/lib/spork/test_framework/cucumber.rb:24:in `run_tests'
/Users/josh/.rvm/gems/ruby-1.9.3-p0@iq/gems/spork-0.9.2/lib/spork/run_strategy/forking.rb:13:in `block in run'
/Users/josh/.rvm/gems/ruby-1.9.3-p0@iq/gems/spork-0.9.2/lib/spork/forker.rb:21:in `block in initialize'
/Users/josh/.rvm/gems/ruby-1.9.3-p0@iq/gems/spork-0.9.2/lib/spork/forker.rb:18:in `fork'
/Users/josh/.rvm/gems/ruby-1.9.3-p0@iq/gems/spork-0.9.2/lib/spork/forker.rb:18:in `initialize'
/Users/josh/.rvm/gems/ruby-1.9.3-p0@iq/gems/spork-0.9.2/lib/spork/run_strategy/forking.rb:9:in `new'
/Users/josh/.rvm/gems/ruby-1.9.3-p0@iq/gems/spork-0.9.2/lib/spork/run_strategy/forking.rb:9:in `run'
/Users/josh/.rvm/gems/ruby-1.9.3-p0@iq/gems/spork-0.9.2/lib/spork/server.rb:48:in `run'
/Users/josh/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/drb/drb.rb:1548:in `perform_without_block'
/Users/josh/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/drb/drb.rb:1508:in `perform'
/Users/josh/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/drb/drb.rb:1586:in `block (2 levels) in main_loop'
/Users/josh/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/drb/drb.rb:1582:in `loop'
/Users/josh/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/drb/drb.rb:1582:in `block in main_loop'
Any idea on how to fix this? Thanks.
Solution from Jim Drannbauer worked for me: http://jimdrannbauer.com/2011/02/22/cucumber-spork-textmate-drb-drbunknown/