Add #be_nil to DSL

This commit is contained in:
Michael Miller 2019-01-26 16:42:58 -07:00
parent 3bfaa07d4f
commit 028065ad26

View file

@ -262,5 +262,16 @@ module Spectator::DSL
Range.new({{min}}, {{max}})
)
end
# Indicates that some value should or should not be nil.
#
# Examples:
# ```
# expect(error).to be_nil
# expect(input).to_not be_nil
# ```
macro be_nil
::Spectator::Matchers::NilMatcher.new
end
end
end