Update naming from partial to target

This commit is contained in:
Michael Miller 2021-10-11 23:03:12 -06:00
parent 53f7c94e8a
commit 5692a77a1b
No known key found for this signature in database
GPG key ID: F9A0C5C65B162436
2 changed files with 3 additions and 2 deletions

View file

@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Fix usage of `be ===` and `be =~` [#34](https://github.com/icy-arctic-fox/spectator/issues/34)
- Better handling of the `be(nil)` when used with value types. [#37](https://github.com/icy-arctic-fox/spectator/issues/37)
- Fix missing arguments for stubbed top-level methods (`system`, `exit`, etc.). [#36](https://github.com/icy-arctic-fox/spectator/issues/36)
- Fix outdated naming when using `expect_any_instance_of`.
### Changed
- Elegantly handle missing/undefined methods with `have_attributes` matcher.

View file

@ -10,8 +10,8 @@ module Spectator::Mocks
Harness.current.mocks.expect(T, stub)
value = Value.new(stub.name, stub.to_s)
matcher = Matchers::ReceiveTypeMatcher.new(value, stub.arguments?)
partial = Expectations::ExpectationPartial.new(actual, @location)
partial.to_eventually(matcher)
target = Expectation::Target.new(actual, @location)
target.to_eventually(matcher)
end
def to(stubs : Enumerable(MethodStub)) : Nil