Skip to content

Instantly share code, notes, and snippets.

@benmacleod
Forked from Fire-Dragon-DoL/dummies_controller_spec.rb
Last active December 28, 2015 20:09
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 benmacleod/7555484 to your computer and use it in GitHub Desktop.
Save benmacleod/7555484 to your computer and use it in GitHub Desktop.
describe 'DELETE #destroy' do
let(:dummy) { mock('Dummy') }
it "should find the object with the given ID and destroy it" do
# set the expectations about the interactions
Dummy.should_receive(:find).with(99).and_return dummy
dummy.should_receive(:destroy)
delete :destroy, id: 99
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment