Skip to content

Commit

Permalink
Fix: shut up crystal exhaustive case warnings
Browse files Browse the repository at this point in the history
In one case the compiler is wrong: the case is exhaustive. The other
two cases are noise.
  • Loading branch information
ysbaddaden committed Apr 7, 2020
1 parent 05075a6 commit 38f3239
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/assertions.cr
Expand Up @@ -309,11 +309,13 @@ module Minitest
case stdout
when String then assert_equal stdout, output
when Regex then assert_match stdout, output
when Nil # skip
end

case stderr
when String then assert_equal stderr, error
when Regex then assert_match stderr, error
when Nil # skip
end
end

Expand Down
2 changes: 2 additions & 0 deletions src/reporter.cr
Expand Up @@ -161,6 +161,8 @@ module Minitest
when Skip
puts " #{i + 1}) Skipped:".colorize(:yellow)
puts "#{loc} [#{exception.__minitest_location}]:\n#{exception.message}"
else
# shut up, crystal (you're wrong)

This comment has been minimized.

Copy link
@mamantoha

mamantoha Apr 7, 2020

😄

end
puts
end
Expand Down

0 comments on commit 38f3239

Please sign in to comment.