Skip to content

Instantly share code, notes, and snippets.

@joeljackson
Created August 6, 2014 18:21
Show Gist options
  • Save joeljackson/2113e4d96e6a2aa8137f to your computer and use it in GitHub Desktop.
Save joeljackson/2113e4d96e6a2aa8137f to your computer and use it in GitHub Desktop.
class Klass
def a(b)
p "Hello"
end
def c
a(1)
a(2)
end
end
describe Klass do
subject { Klass.new }
before {
allow(subject).to receive(:a)
subject.c
}
it {
should have_received(:a).with(1).once.ordered
should have_received(:a).with(2).once.ordered
}
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment