class MotionExpect::Matcher::HaveItems
Public Class Methods
new(number_of_items)
click to toggle source
# File lib/motion-expect/matcher/have_items.rb, line 3 def initialize(number_of_items) @number_of_items = number_of_items end
Public Instance Methods
fail!(subject, negated)
click to toggle source
# File lib/motion-expect/matcher/have_items.rb, line 18 def fail!(subject, negated) raise FailedExpectation.new(FailMessageRenderer.message_for_have_items(negated, subject, @number_of_items, subject.size, @key_type_name)) end
matches?(value)
click to toggle source
# File lib/motion-expect/matcher/have_items.rb, line 7 def matches?(value) value.size == @number_of_items end