Add empty matcher to DSL

This commit is contained in:
Michael Miller 2019-01-26 17:04:46 -07:00
parent ed3f524f8d
commit 30582f9a89
1 changed files with 10 additions and 0 deletions

View File

@ -273,5 +273,15 @@ module Spectator::DSL
macro be_nil macro be_nil
::Spectator::Matchers::NilMatcher.new ::Spectator::Matchers::NilMatcher.new
end end
# Indicates that some collection should be empty.
#
# Example:
# ```
# expect([]).to be_empty
# ```
macro be_empty
::Spectator::Matchers::EmptyMatcher.new
end
end end
end end