method
helper
1.3.0 -
Show latest stable
-
0 notes -
Class: Spec::Matchers
- 1.1.4
- 1.1.12
- 1.2.0
- 1.2.8 (0)
- 1.3.0 (0)
- 1.3.1 (0)
- What's this?
helper(actual, *_expected_)
public
Hide source
# File lib/spec/matchers/include.rb, line 25 def helper(actual, *_expected_) _expected_.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