mirror of
https://gitea.invidious.io/iv-org/shard-spectator.git
synced 2024-08-15 00:53:35 +00:00
Add require statements and namespace Value
When defining a matcher outside of the `Spectator` module (custom matcher), `Value(ExpectedType)` can't be resolved. I suspect this is a Crystal compiler bug, since a derived class should not affect lookups of parent classes like this. Require statements are added to (hopefully) ensure `Spectator::Value` is defined for the initializer. Related to https://github.com/icy-arctic-fox/spectator/issues/46
This commit is contained in:
parent
7549351cce
commit
ccdf9f124b
1 changed files with 3 additions and 1 deletions
|
@ -1,3 +1,5 @@
|
|||
require "../expression"
|
||||
require "../value"
|
||||
require "./standard_matcher"
|
||||
|
||||
module Spectator::Matchers
|
||||
|
@ -22,7 +24,7 @@ module Spectator::Matchers
|
|||
|
||||
# Creates the value matcher.
|
||||
# The expected value is stored for later use.
|
||||
def initialize(@expected : Value(ExpectedType))
|
||||
def initialize(@expected : ::Spectator::Value(ExpectedType))
|
||||
end
|
||||
|
||||
# Additional information about the match failure.
|
||||
|
|
Loading…
Reference in a new issue