Skip to content

Instantly share code, notes, and snippets.

@zeedunk
Created December 3, 2010 01:45
Show Gist options
  • Save zeedunk/726447 to your computer and use it in GitHub Desktop.
Save zeedunk/726447 to your computer and use it in GitHub Desktop.
class ControllerTest < ActionController::TestCase
context 'on create' do
setup do
@the_model = stub
TheModel.stubs(:new).returns(@the_model)
post :create
end
should 'save the new model' do
@the_model.verify(:save)
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment