Document truthy flag

This commit is contained in:
Michael Miller 2019-01-23 16:07:26 -07:00
parent 95b0563f73
commit 3d4d8f67be

View file

@ -7,6 +7,8 @@ module Spectator::Matchers
# Truthy is the opposite of falsey.
struct TruthyMatcher < ValueMatcher(Bool)
# Creates the truthy matcher.
# The `truthy` argument should be true to match "truthy" values,
# and false to match "falsey" values.
def initialize(truthy : Bool)
super(truthy ? "truthy" : "falsey", truthy)
end