I used cucumber for the first time with 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
and used the generator to install the cucumber skeleton
rails generate cucumber:install --rspec --capybara
this generates a 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
if I run the simplest feature it runs through but after the test it raises an exception
$ 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]
I can't find the solution for this little problem, any help?
Try with putting this file features/support/minitest_disable.rb the following code:
and see this discussion in cucumber project
Try using
cucumber features
or simplycucumber
instead ofrake cucumber
.