mirror of
https://gitea.invidious.io/iv-org/shard-spectator.git
synced 2024-08-15 00:53:35 +00:00
Use label (expression string) instead of value
This commit is contained in:
parent
371fe680c2
commit
f63f8b15a0
2 changed files with 3 additions and 3 deletions
|
@ -2,7 +2,7 @@ require "./matchers/matcher"
|
|||
|
||||
module Spectator
|
||||
class Expectation(T)
|
||||
private getter label : String
|
||||
protected getter label : String
|
||||
getter actual : T
|
||||
|
||||
protected def initialize(@label : String, @actual : T)
|
||||
|
|
|
@ -12,11 +12,11 @@ module Spectator
|
|||
end
|
||||
|
||||
def message(expectation : Expectation) : String
|
||||
"Expected #{expectation.actual} to equal #{@expected} (using ==)"
|
||||
"Expected #{expectation.label} to equal #{label} (using ==)"
|
||||
end
|
||||
|
||||
def negated_message(expectation : Expectation) : String
|
||||
"Expected #{expectation.actual} to not equal #{@expected} (using ==)"
|
||||
"Expected #{expectation.label} to not equal #{label} (using ==)"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue