-
-
Save anonymous/b7a96016e31d5674cf43dffcf15ca35b to your computer and use it in GitHub Desktop.
object_spec.rb
This file contains 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
describe "#method" do | |
subject { build(:object) } | |
before do | |
allow(subject).to receive(:method1) | |
allow(subject).to receive(:method2) | |
allow(subject).to receive(:method3) | |
allow(subject).to receive(:method4) | |
end | |
it "calls method1" do | |
expect(subject).to receive(:method1) | |
subject.method | |
end | |
it "calls method2" do | |
expect(subject).to receive(:method2) | |
subject.method | |
end | |
it "calls method3" do | |
expect(subject).to receive(:method3) | |
subject.method | |
end | |
it "calls method4" do | |
expect(subject).to receive(:method4) | |
subject.method | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment