Skip to content

Instantly share code, notes, and snippets.

@jbrechtel
Created August 22, 2011 00:05
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 jbrechtel/1161372 to your computer and use it in GitHub Desktop.
Save jbrechtel/1161372 to your computer and use it in GitHub Desktop.
mocking in Ruby
describe SomeController do
context "GET show" do
it "should log that a thing was shown" do
controller.logger.should_receive(:notice).with('thing was shown')
get :show
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment