mirror of
https://gitea.invidious.io/iv-org/shard-spectator.git
synced 2024-08-15 00:53:35 +00:00
Add functionality to clear stubs
This commit is contained in:
parent
fdac99d122
commit
c98442e0ed
7 changed files with 99 additions and 12 deletions
|
@ -315,4 +315,15 @@ Spectator.describe Spectator::Double do
|
|||
end
|
||||
end
|
||||
end
|
||||
|
||||
describe "#_spectator_clear_stubs" do
|
||||
subject(dbl) { FooBarDouble.new }
|
||||
let(stub) { Spectator::ValueStub.new(:foo, 5) }
|
||||
|
||||
before_each { dbl._spectator_define_stub(stub) }
|
||||
|
||||
it "removes previously defined stubs" do
|
||||
expect { dbl._spectator_clear_stubs }.to change { dbl.foo }.from(5).to(42)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue