2013-02-25 59 views
0

我在1.9模式下使用jruby 1.6.7.2在Rails 3環境中運行黃瓜測試。我使用的命令是bundle exec cucumber --format junit --out features/reports feature/test.featureJUnit輸出的黃瓜錯誤

它運行的功能,然後它顯示一個錯誤說:

undefined method `unwrap!' for #<IO:fd 1> (NoMethodError) 
/home/jenkins/.rvm/gems/jruby-1.6.7.2/gems/cucumber-1.2.1/bin/../lib/cucumber/formatter/interceptor.rb:39:in `unwrap!' 
/home/jenkins/.rvm/gems/jruby-1.6.7.2/gems/cucumber-1.2.1/bin/../lib/cucumber/formatter/junit.rb:67:in `after_feature' 
org/jruby/RubyBasicObject.java:1704:in `__send__' 
/home/jenkins/.rvm/gems/jruby-1.6.7.2/gems/cucumber-1.2.1/bin/../lib/cucumber/ast/tree_walker.rb:173:in `send_to_all' 
org/jruby/RubyArray.java:1615:in `each' 
/home/jenkins/.rvm/gems/jruby-1.6.7.2/gems/cucumber-1.2.1/bin/../lib/cucumber/ast/tree_walker.rb:171:in `send_to_all' 
/home/jenkins/.rvm/gems/jruby-1.6.7.2/gems/cucumber-1.2.1/bin/../lib/cucumber/ast/tree_walker.rb:164:in `broadcast' 
/home/jenkins/.rvm/gems/jruby-1.6.7.2/gems/cucumber-1.2.1/bin/../lib/cucumber/ast/tree_walker.rb:19:in `visit_feature' 
/home/jenkins/.rvm/gems/jruby-1.6.7.2/gems/cucumber-1.2.1/bin/../lib/cucumber/ast/features.rb:29:in `accept' 
org/jruby/RubyArray.java:1615:in `each' 
/home/jenkins/.rvm/gems/jruby-1.6.7.2/gems/cucumber-1.2.1/bin/../lib/cucumber/ast/features.rb:17:in `each' 
/home/jenkins/.rvm/gems/jruby-1.6.7.2/gems/cucumber-1.2.1/bin/../lib/cucumber/ast/features.rb:28:in `accept' 
/home/jenkins/.rvm/gems/jruby-1.6.7.2/gems/cucumber-1.2.1/bin/../lib/cucumber/ast/tree_walker.rb:14:in `visit_features' 
/home/jenkins/.rvm/gems/jruby-1.6.7.2/gems/cucumber-1.2.1/bin/../lib/cucumber/ast/tree_walker.rb:163:in `broadcast' 
/home/jenkins/.rvm/gems/jruby-1.6.7.2/gems/cucumber-1.2.1/bin/../lib/cucumber/ast/tree_walker.rb:13:in `visit_features' 
/home/jenkins/.rvm/gems/jruby-1.6.7.2/gems/cucumber-1.2.1/bin/../lib/cucumber/runtime.rb:46:in `run!' 
/home/jenkins/.rvm/gems/jruby-1.6.7.2/gems/cucumber-1.2.1/bin/../lib/cucumber/cli/main.rb:43:in `execute!' 
/home/jenkins/.rvm/gems/jruby-1.6.7.2/gems/cucumber-1.2.1/bin/../lib/cucumber/cli/main.rb:20:in `execute' 
/home/jenkins/.rvm/gems/jruby-1.6.7.2/gems/cucumber-1.2.1/bin/cucumber:14:in `(root)' 
org/jruby/RubyKernel.java:1068:in `load' 
/home/jenkins/.rvm/gems/jruby-1.6.7.2/gems/cucumber-1.2.1/bin/cucumber:19:in `' 
org/jruby/RubyKernel.java:1088:in `eval' 

回答

0

使用此命令

cucumber features/reports feature/test.feature --format junit --out features 

說明:--out功能(功能是此處的文件夾/目錄)