mirror of
https://gitea.invidious.io/iv-org/shard-spectator.git
synced 2024-08-15 00:53:35 +00:00
Use inspect on values in to_s
The to_json method calls to_s, which results in incorrect output.
This commit is contained in:
parent
53de72805b
commit
9650d7f9c1
5 changed files with 5 additions and 5 deletions
|
@ -21,7 +21,7 @@ module Spectator::Matchers
|
||||||
|
|
||||||
# Produces a stringified value.
|
# Produces a stringified value.
|
||||||
def to_s(io)
|
def to_s(io)
|
||||||
io << value
|
@value.inspect(io)
|
||||||
end
|
end
|
||||||
|
|
||||||
# Produces a stringified value with additional information.
|
# Produces a stringified value with additional information.
|
||||||
|
|
|
@ -12,7 +12,7 @@ module Spectator::Matchers
|
||||||
|
|
||||||
# Stringifies the value.
|
# Stringifies the value.
|
||||||
def to_s(io)
|
def to_s(io)
|
||||||
io << @value
|
@value.inspect(io)
|
||||||
end
|
end
|
||||||
|
|
||||||
# Inspects the value.
|
# Inspects the value.
|
||||||
|
|
|
@ -21,7 +21,7 @@ module Spectator::Matchers
|
||||||
# The string will be prefixed with "Not" when negated.
|
# The string will be prefixed with "Not" when negated.
|
||||||
def to_s(io)
|
def to_s(io)
|
||||||
io << "Not " if @negated
|
io << "Not " if @negated
|
||||||
io << @value
|
@value.inspect(io)
|
||||||
end
|
end
|
||||||
|
|
||||||
# Produces a stringified value with additional information.
|
# Produces a stringified value with additional information.
|
||||||
|
|
|
@ -26,7 +26,7 @@ module Spectator::Matchers
|
||||||
def to_s(io)
|
def to_s(io)
|
||||||
io << prefix
|
io << prefix
|
||||||
io << ' '
|
io << ' '
|
||||||
io << @value
|
@value.inspect(io)
|
||||||
end
|
end
|
||||||
|
|
||||||
# Produces a stringified value with additional information.
|
# Produces a stringified value with additional information.
|
||||||
|
|
|
@ -14,7 +14,7 @@ module Spectator::Matchers
|
||||||
def to_s(io)
|
def to_s(io)
|
||||||
io << @prefix
|
io << @prefix
|
||||||
io << ' '
|
io << ' '
|
||||||
io << @value
|
@value.inspect(io)
|
||||||
end
|
end
|
||||||
|
|
||||||
# Outputs details of the formatted value with a prefix.
|
# Outputs details of the formatted value with a prefix.
|
||||||
|
|
Loading…
Reference in a new issue