mirror of
https://gitea.invidious.io/iv-org/shard-spectator.git
synced 2024-08-15 00:53:35 +00:00
Use new mock DSL
This commit is contained in:
parent
678f85eac1
commit
2bb9fe8dcd
10 changed files with 19 additions and 19 deletions
|
@ -23,11 +23,11 @@ class Dog
|
|||
end
|
||||
|
||||
Spectator.describe Person do
|
||||
mock Dog
|
||||
mock MockDog < Dog
|
||||
|
||||
describe "#pet" do
|
||||
it "pets the persons dog" do
|
||||
dog = mock(Dog)
|
||||
dog = MockDog.new
|
||||
person = Person.new(dog)
|
||||
allow(dog).to receive(pet()).and_return("woof")
|
||||
|
||||
|
@ -39,7 +39,7 @@ Spectator.describe Person do
|
|||
|
||||
describe "#pet_more" do
|
||||
it "pets the persons dog alot" do
|
||||
dog = mock(Dog)
|
||||
dog = MockDog.new
|
||||
person = Person.new(dog)
|
||||
allow(dog).to receive(pet()).and_return("woof")
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue