Skip to content

Instantly share code, notes, and snippets.

@AJFaraday
Created July 9, 2012 10:05
Show Gist options
  • Save AJFaraday/3075534 to your computer and use it in GitHub Desktop.
Save AJFaraday/3075534 to your computer and use it in GitHub Desktop.
stubs structure
def test_recalc_with_formula_error
Parameter.any_instance.stubs(:default_formula => "=whatever")
get :recalc, :id => @task
#...
ensure
Parameter.any_instance.unstub(:default_formula)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment