2011-02-03 46 views
1

我用黄瓜,第一次与轨道3黄瓜,RSpec的和Rails 3引发错误选项:--profile

的Gemfile

group :test do 
gem "rspec" 
gem "rspec-rails" 
gem "database_cleaner" 
gem "spork" 
gem "cucumber",   :git => "git://github.com/aslakhellesoy/cucumber.git" 
gem "cucumber-rails", :git => "git://github.com/aslakhellesoy/cucumber-rails.git" 
gem "capybara" 
gem "capybara-envjs" 
gem "launchy" 
gem "ruby-debug" 
end 

和使用的发电机安装黄瓜骨架

rails generate cucumber:install --rspec --capybara 

这产生cucumber.yml

<% 
rerun = File.file?('rerun.txt') ? IO.read('rerun.txt') : "" 
rerun_opts = rerun.to_s.strip.empty? ? "--format #{ENV['CUCUMBER_FORMAT'] || 'progress'} features" : "--format #{ENV['CUCUMBER_FORMAT'] || 'pretty'} #{rerun}" 
std_opts = "--format #{ENV['CUCUMBER_FORMAT'] || 'pretty'} --strict --tags [email protected]" 
%> 
default: <%= std_opts %> features 
wip: --tags @wip:3 --wip features 
rerun: <%= rerun_opts %> --format rerun --out rerun.txt --strict --tags [email protected] 

,如果我跑的最简单的功能,它贯穿但测试后,会引发异常

$ rake cucumber 
bundle exec /Users/www/.rvm/rubies/ruby-1.8.7-p330/bin/ruby -I "/Users/www/.rvm/gems/[email protected]_app/bundler/gems/cucumber-e2df150cc4fd/lib:lib" "/Users/www/.rvm/gems/[email protected]_app/bundler/gems/cucumber-e2df150cc4fd/bin/cucumber" --profile default 
Using the default profile... 
(...) 
1 scenario (1 passed) 
2 steps (2 passed) 
0m0.146s 
invalid option: --profile 
Test::Unit automatic runner. 
Usage: /Users/www/.rvm/gems/[email protected]_app/bundler/gems/cucumber-e2df150cc4fd/bin/cucumber [options] [-- untouched arguments] 

我无法找到这个小问题的解决方案,帮助吗?

回答

1

尝试使用cucumber features或简单地cucumber而不是rake cucumber

+0

O.K. “捆绑exec黄瓜”的作品,谢谢,但为什么? – Beffa 2011-02-03 23:24:08

1

与把这个文件功能尝试/支持/ minitest_disable.rb下面的代码:

require 'multi_test' 
MultiTest.disable_autorun 

看这discussion黄瓜项目