method
matches?
1.1.12 -
Show latest stable
-
0 notes -
Class: Spec::Matchers::Include
- 1.1.4 (0)
- 1.1.12 (0)
- 1.2.0 (0)
- 1.2.8
- 1.3.0
- 1.3.1
- What's this?
matches?(actual)
public
Hide source
# File lib/spec/matchers/include.rb, line 10 def matches?(actual) @actual = actual @expecteds.each do |expected| if actual.is_a?(Hash) if expected.is_a?(Hash) expected.each_pair do |k,v| return false unless actual[k] == v end else return false unless actual.has_key?(expected) end else return false unless actual.include?(expected) end end true end