mirror of
https://gitea.invidious.io/iv-org/shard-spectator.git
synced 2024-08-15 00:53:35 +00:00
Replace stub value method with call method
Pass method call information to stub.
This commit is contained in:
parent
f00ea23c47
commit
17592287ad
7 changed files with 21 additions and 17 deletions
|
@ -1,6 +1,7 @@
|
|||
require "../../spec_helper"
|
||||
|
||||
Spectator.describe Spectator::ValueStub do
|
||||
let(method_call) { Spectator::MethodCall.capture(:foo) }
|
||||
subject(stub) { Spectator::ValueStub.new(:foo, 42) }
|
||||
|
||||
it "stores the method name" do
|
||||
|
@ -8,7 +9,7 @@ Spectator.describe Spectator::ValueStub do
|
|||
end
|
||||
|
||||
it "stores the return value" do
|
||||
expect(stub.value).to eq(42)
|
||||
expect(stub.call(method_call)).to eq(42)
|
||||
end
|
||||
|
||||
describe "#===" do
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue