Created
August 6, 2014 18:21
-
-
Save joeljackson/2113e4d96e6a2aa8137f 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
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