Skip to content

Instantly share code, notes, and snippets.

@sorah
Created February 22, 2012 11:22
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 sorah/1884239 to your computer and use it in GitHub Desktop.
Save sorah/1884239 to your computer and use it in GitHub Desktop.
class Foo
def hi; end
def bar
hi if @flag
@flag = true
end
end
describe 'some' do
subject { Foo.new }
it 'does' do
subject.should_not_receive(:hi)
subject.bar
subject.should_receive(:hi)
subject.bar
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment