Cucumber、rspec 和 Rails 3 引发错误选项:--profile
我第一次在 Rails
3.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 ~@wip"
%>
default: <%= std_opts %> features
wip: --tags @wip:3 --wip features
rerun: <%= rerun_opts %> --format rerun --out rerun.txt --strict --tags ~@wip
,但在测试后它会引发异常,
$ rake cucumber
bundle exec /Users/www/.rvm/rubies/ruby-1.8.7-p330/bin/ruby -I "/Users/www/.rvm/gems/ruby-1.8.7-p330@my_app/bundler/gems/cucumber-e2df150cc4fd/lib:lib" "/Users/www/.rvm/gems/ruby-1.8.7-p330@my_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/ruby-1.8.7-p330@my_app/bundler/gems/cucumber-e2df150cc4fd/bin/cucumber [options] [-- untouched arguments]
我找不到这个小问题的解决方案,有帮助吗?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
尝试使用
cucumber 功能
或简单地cucumber
而不是rake cucumber
。Try using
cucumber features
or simplycucumber
instead ofrake cucumber
.尝试将此文件features/support/minitest_disable.rb放入以下代码:
并查看此讨论
Try with putting this file features/support/minitest_disable.rb the following code:
and see this discussion in cucumber project