class Object
Public Instance Methods
actual_matches(actual_items, item_matcher)
click to toggle source
# File lib/storexplore/testing/matchers/mostly_matcher.rb, line 36 def actual_matches(actual_items, item_matcher) actual_items.find_all {|item| item_matcher.matches?(item)} end
expected_uniques_count(actual_items)
click to toggle source
private
# File lib/storexplore/testing/matchers/mostly_matcher.rb, line 33 def expected_uniques_count(actual_items) (actual_items.length * threshold).round end
have_unique(key)
click to toggle source
# File lib/storexplore/testing/matchers/have_unique_matcher.rb, line 70 def have_unique(key) HaveUnique.new(key) end
threshold()
click to toggle source
# File lib/storexplore/testing/matchers/mostly_matcher.rb, line 40 def threshold 0.7 end