Skip to content

Instantly share code, notes, and snippets.

@Fire-Dragon-DoL
Created November 20, 2013 00:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save Fire-Dragon-DoL/7555467 to your computer and use it in GitHub Desktop.
Save Fire-Dragon-DoL/7555467 to your computer and use it in GitHub Desktop.
Testing controller destroy action without using change on :count
it "DELETE #destroy" do
dummy = FactoryGirl.create(:dummy)
delete :show, id: dummy.id
dummy.reload
dummy.persisted?.should be_false
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment