I’m having this issue with cucumber when. Here is everything.
My Gemfile
source 'https://rubygems.org'
gem 'rails', '3.2.1'
gem 'pg'
# Gems used only for assets and not required
# in production environments by default.
group :assets do
gem 'sass-rails', '~> 3.2.3'
gem 'coffee-rails', '~> 3.2.1'
gem 'uglifier', '>= 1.0.3'
end
gem 'jquery-rails'
group :test do
gem 'rspec-rails'
gem 'factory_girl_rails'
gem 'cucumber-rails'
gem 'database_cleaner'
gem 'capybara'
end
Feature Test
Feature: Requesting invitations
As a visitor
I want to request a beta invitation
So I can be sent an invitation when the site is ready
Scenario: Requesting an invitation
Given I am on the homepage
When I request and invitation for "foo@example.com"
Then I should see "Your on the list" confirmation
Error output
Feature: Requesting invitations
As a visitor
I want to request a beta invitation
So I can be sent an invitation when the site is ready
Scenario: Requesting an invitation
Given I am on the homepage
When I request and invitation for "foo@example.com"
Then I should see "Your on the list" confirmation
rake cucumber:ok
/Users/node/.rvm/rubies/ruby-1.9.2-p290/bin/ruby -S bundle exec cucumber --profile default
Using the default profile...
Feature: Requesting invitations
As a visitor
I want to request a beta invitation
So I can be sent an invitation when the site is ready
Scenario: Requesting an invitation # features/requesting_invitations.feature:6
Deprecated: please use #source_tags instead.
Given I am on the homepage # features/requesting_invitations.feature:7
Undefined step: "I am on the homepage" (Cucumber::Undefined)
features/requesting_invitations.feature:7:in `Given I am on the homepage'
When I request and invitation for "foo@example.com" # features/requesting_invitations.feature:8
Undefined step: "I request and invitation for "foo@example.com"" (Cucumber::Undefined)
features/requesting_invitations.feature:8:in `When I request and invitation for "foo@example.com"'
Then I should see "Your on the list" confirmation # features/requesting_invitations.feature:9
Undefined step: "I should see "Your on the list" confirmation" (Cucumber::Undefined)
features/requesting_invitations.feature:9:in `Then I should see "Your on the list" confirmation'
1 scenario (1 undefined)
3 steps (3 undefined)
0m0.967s
You can implement step definitions for undefined steps with these snippets:
Given /^I am on the homepage$/ do
pending # express the regexp above with the code you wish you had
end
When /^I request and invitation for "([^"]*)"$/ do |arg1|
pending # express the regexp above with the code you wish you had
end
Then /^I should see "([^"]*)" confirmation$/ do |arg1|
pending # express the regexp above with the code you wish you had
end
rake aborted!
Command failed with status (1): [/Users/node/.rvm/rubies/ruby-1.9.2-p290/bi...]
Tasks: TOP => cucumber:ok
(See full trace by running task with --trace)
So as you can see for some reason it’s breaking when I run this rake task. I get the same thing when I run ‘rake cucumber’ I don’t know what a #source_tag is and wasn’t able to find documentation on it. How can I fix this and remove the error? I thought this was a pretty straight forward scenario. Gem list gives:
cucumber (1.1.8)
cucumber-rails (1.3.0)
Thanks. Any help is welcome.
The #source_tag warning is really meant for the capybara devs. Capybara is a dependency of cucumber-rails.
(Hint, this is a great time to trim down that Gemfile… every bit helps.)
As seen within the cucumber github issues
…
tl;dr upgrade to
cucumber>= 1.1.9 and the #source_tag distraction will go away.