我使用Cucumber来测试我的Rails应用程序,并且由于运行Spork,我不必每次运行场景时都启动整个Rails应用程序。
我已在TextMate中将TM_CUCUMBER_OPTS
设置为--drb
,效果很好,但会导致结果格式化:它只是文本,而不是HTML。
有什么方法可以解决这个问题?我试过--format = html,但结果是:
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'
有关如何解决此问题的任何想法?感谢。
答案 0 :(得分:1)
Jim Drannbauer的解决方案为我工作:http://jimdrannbauer.com/2011/02/22/cucumber-spork-textmate-drb-drbunknown/