mirror of
https://gitea.invidious.io/iv-org/shard-spectator.git
synced 2024-08-15 00:53:35 +00:00
Copy-paste and tweak to implement argument expectations
This commit is contained in:
parent
4acf6aaa58
commit
82e01e44de
2 changed files with 7 additions and 2 deletions
|
@ -314,8 +314,8 @@ Items not marked as completed may have partial implementations.
|
||||||
- [X] Doubles (Stand-ins for real types) - `double NAME { }`
|
- [X] Doubles (Stand-ins for real types) - `double NAME { }`
|
||||||
- [X] Method stubs - `allow().to receive()`, `allow().to receive().and_return()`
|
- [X] Method stubs - `allow().to receive()`, `allow().to receive().and_return()`
|
||||||
- [ ] Spies - `expect().to receive()`
|
- [ ] Spies - `expect().to receive()`
|
||||||
- [ ] Message expectations - `expect().to receive().at_least()`
|
- [X] Message expectations - `expect().to receive().at_least()`
|
||||||
- [ ] Argument expectations - `expect().to receive().with()`
|
- [X] Argument expectations - `expect().to receive().with()`
|
||||||
- [ ] Message ordering - `expect().to receive().ordered`
|
- [ ] Message ordering - `expect().to receive().ordered`
|
||||||
- [ ] Null doubles
|
- [ ] Null doubles
|
||||||
- [ ] Runner
|
- [ ] Runner
|
||||||
|
|
|
@ -38,6 +38,11 @@ module Spectator::Matchers
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def with(*args, **opts)
|
||||||
|
args = Mocks::GenericArguments.new(args, opts)
|
||||||
|
ReceiveArgumentsMatcher.new(@expected, args, @range)
|
||||||
|
end
|
||||||
|
|
||||||
def once
|
def once
|
||||||
ReceiveMatcher.new(@expected, (1..1))
|
ReceiveMatcher.new(@expected, (1..1))
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue