Created
August 22, 2011 00:05
-
-
Save jbrechtel/1161372 to your computer and use it in GitHub Desktop.
mocking in Ruby
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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