diff --git a/src/spectator/matchers/alternative_match_data_value.cr b/src/spectator/matchers/alternative_match_data_value.cr index 49e904a..e368c0f 100644 --- a/src/spectator/matchers/alternative_match_data_value.cr +++ b/src/spectator/matchers/alternative_match_data_value.cr @@ -21,7 +21,7 @@ module Spectator::Matchers # Produces a stringified value. def to_s(io) - io << value + @value.inspect(io) end # Produces a stringified value with additional information. diff --git a/src/spectator/matchers/generic_match_data_value.cr b/src/spectator/matchers/generic_match_data_value.cr index 3d751f9..9069489 100644 --- a/src/spectator/matchers/generic_match_data_value.cr +++ b/src/spectator/matchers/generic_match_data_value.cr @@ -12,7 +12,7 @@ module Spectator::Matchers # Stringifies the value. def to_s(io) - io << @value + @value.inspect(io) end # Inspects the value. diff --git a/src/spectator/matchers/negatable_match_data_value.cr b/src/spectator/matchers/negatable_match_data_value.cr index ac764fe..62abf49 100644 --- a/src/spectator/matchers/negatable_match_data_value.cr +++ b/src/spectator/matchers/negatable_match_data_value.cr @@ -21,7 +21,7 @@ module Spectator::Matchers # The string will be prefixed with "Not" when negated. def to_s(io) io << "Not " if @negated - io << @value + @value.inspect(io) end # Produces a stringified value with additional information. diff --git a/src/spectator/matchers/negatable_prefixed_match_data_value.cr b/src/spectator/matchers/negatable_prefixed_match_data_value.cr index f4cf4ea..9cc6138 100644 --- a/src/spectator/matchers/negatable_prefixed_match_data_value.cr +++ b/src/spectator/matchers/negatable_prefixed_match_data_value.cr @@ -26,7 +26,7 @@ module Spectator::Matchers def to_s(io) io << prefix io << ' ' - io << @value + @value.inspect(io) end # Produces a stringified value with additional information. diff --git a/src/spectator/matchers/prefixed_match_data_value.cr b/src/spectator/matchers/prefixed_match_data_value.cr index 1e22002..feea8cc 100644 --- a/src/spectator/matchers/prefixed_match_data_value.cr +++ b/src/spectator/matchers/prefixed_match_data_value.cr @@ -14,7 +14,7 @@ module Spectator::Matchers def to_s(io) io << @prefix io << ' ' - io << @value + @value.inspect(io) end # Outputs details of the formatted value with a prefix.