mirror of
https://gitea.invidious.io/iv-org/shard-spectator.git
synced 2024-08-15 00:53:35 +00:00
Test Allow
This commit is contained in:
parent
f1ce914b73
commit
3299c94359
1 changed files with 13 additions and 0 deletions
13
spec/spectator/mocks/allow_spec.cr
Normal file
13
spec/spectator/mocks/allow_spec.cr
Normal file
|
@ -0,0 +1,13 @@
|
|||
require "../../spec_helper"
|
||||
|
||||
Spectator.describe Spectator::Allow do
|
||||
let(dbl) { Spectator::LazyDouble.new(foo: 42) }
|
||||
let(stub) { Spectator::ValueStub.new(:foo, 123) }
|
||||
subject(alw) { Spectator::Allow.new(dbl) }
|
||||
|
||||
describe "#to" do
|
||||
it "applies a stub" do
|
||||
expect { alw.to(stub) }.to change { dbl.foo }.from(42).to(123)
|
||||
end
|
||||
end
|
||||
end
|
Loading…
Reference in a new issue