Skip to content

Instantly share code, notes, and snippets.

@erithmetic
Created February 14, 2012 22:18
Show Gist options
  • Save erithmetic/1831009 to your computer and use it in GitHub Desktop.
Save erithmetic/1831009 to your computer and use it in GitHub Desktop.
# mygem/lib/test_support/cucumber/sniff_activity.rb
module Sniff
module Activity
def do_it
run.some_code.that_fails
end
end
end
# rails_app/features/support/env.rb
World Sniff::Activity
# rails_app/features/step_definitions/my_steps.rb
When "I run the Activity" do
do_it
end
Output:
undefined method `another_method_deep_in_the_code' for nil:NilClass (NoMethodError)
/rails_app/features/step_definitions/my_steps.rb:9:in `/^I run the activity$/'
features/whatever.feature:118:in `When I run the Activity'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment