I am using Rails 3. All my cucumber tests are passing. However if I
add @javascript to one of the test and if I run following command
bundle exec cucumber -p javascript
Then I am getting following error.
Using the javascript profile...
Feature: authentication
@javascript
Scenario: test login # features/
auth.feature:4
uninitialized constant DatabaseCleaner (NameError)
Here is my 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'] || 'progress'} --strict
--tags ~@wip"
%>
default: <%= std_opts %> features
wip: --tags @wip:3 --wip features
rerun: <%= rerun_opts %> --format rerun --out rerun.txt --strict --
tags ~@wip
javascript: --tags @javascript
Here is my Gemfile
source '
http://rubygems.org'
gem 'rails', '3.0.0'
gem 'sqlite3-ruby', :require => 'sqlite3'
gem 'ruby-debug'
gem 'capistrano'
gem 'will_paginate', :git => 'git://
github.com/mislav/
will_paginate.git', :branch => 'rails3'
gem 'faker'
group :development, :test do
gem 'shoulda'
gem "rspec-rails", ">= 2.0.0.beta.22"
gem "cucumber-rails", ">= 0.3.2"
gem "capybara"
gem "launchy"
end
As I mentioned with the default profile all the tests are passing.
This problem happens only when I pass -p javascript