Use RSpec3 format stubs
This commit is contained in:
parent
386fae821b
commit
fb813f1e80
2 changed files with 9 additions and 6 deletions
|
@ -46,9 +46,12 @@ describe Mutant::Matcher::Methods::Instance, '#each' do
|
|||
|
||||
before do
|
||||
matcher = Mutant::Matcher::Method::Instance
|
||||
allow(matcher).to receive(:new).with(env, Foo, Foo.instance_method(:method_a)).and_return([subject_a])
|
||||
allow(matcher).to receive(:new).with(env, Foo, Foo.instance_method(:method_b)).and_return([subject_b])
|
||||
allow(matcher).to receive(:new).with(env, Foo, Foo.instance_method(:method_c)).and_return([subject_c])
|
||||
allow(matcher).to receive(:new)
|
||||
.with(env, Foo, Foo.instance_method(:method_a)).and_return([subject_a])
|
||||
allow(matcher).to receive(:new)
|
||||
.with(env, Foo, Foo.instance_method(:method_b)).and_return([subject_b])
|
||||
allow(matcher).to receive(:new)
|
||||
.with(env, Foo, Foo.instance_method(:method_c)).and_return([subject_c])
|
||||
end
|
||||
|
||||
it 'should yield expected subjects' do
|
||||
|
|
|
@ -40,11 +40,11 @@ describe Mutant::Matcher::Methods::Singleton, '#each' do
|
|||
|
||||
before do
|
||||
matcher = Mutant::Matcher::Method::Singleton
|
||||
matcher.stub(:new)
|
||||
allow(matcher).to receive(:new)
|
||||
.with(env, Foo, Foo.method(:method_a)).and_return([subject_a])
|
||||
matcher.stub(:new)
|
||||
allow(matcher).to receive(:new)
|
||||
.with(env, Foo, Foo.method(:method_b)).and_return([subject_b])
|
||||
matcher.stub(:new)
|
||||
allow(matcher).to receive(:new)
|
||||
.with(env, Foo, Foo.method(:method_c)).and_return([subject_c])
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue