Skip to content

Instantly share code, notes, and snippets.

@joshski
Created March 30, 2009 23:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save joshski/87941 to your computer and use it in GitHub Desktop.
Save joshski/87941 to your computer and use it in GitHub Desktop.
# example.feature
Feature: Example
Scenario: Eat
Given I am hungry
Then I should eat
# example_steps.rb
World do
nil
end
Given /^I am hungry$/ do
Given "I have not eaten for 3 days"
end
Given /^I have not eaten for (.+) days$/ do |days|
raise "I give up"
end
# raises:
undefined method `exception=' for nil:NilClass (NoMethodError)
./example_steps.rb:6:in `/^I am hungry$/'
example.feature:5:in `Given I am hungry'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment