Created
October 5, 2011 21:40
-
-
Save jeffrydegrande/1265825 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
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 |
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
subject.should_receive(:disable).never
serve?