Skip to content

Instantly share code, notes, and snippets.

@jeffrydegrande
Created October 5, 2011 21:40
Show Gist options
  • Save jeffrydegrande/1265825 to your computer and use it in GitHub Desktop.
Save jeffrydegrande/1265825 to your computer and use it in GitHub Desktop.
def destroy
if foo?
disable
else
super
end
end
subject.stub(:foo?).and_return(false)
subject.should_not_receive(:disable)
subject.should_receive ??????????????
subject.destroy
@rafaelss
Copy link

rafaelss commented Oct 5, 2011

subject.should_receive(:disable).never

serve?

@jeffrydegrande
Copy link
Author

acabei fazer isso mesmo. serve sim.

valeu

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment