spec/spec_helper.rb in cloudinary-1.2.2 vs spec/spec_helper.rb in cloudinary-1.2.3

- old
+ new

@@ -164,19 +164,19 @@ # expect( {:foo => { :bar => 'foobar'}}).to have_deep_hash_values_of( [:foo, :bar] => 'foobar') # expect( foo_instance).to receive(:bar_method).with(deep_hash_values_of([:foo, :bar] => 'foobar')) RSpec::Matchers.define :deep_hash_value do |expected| match do |actual| expected.all? do |path, value| - Cloudinary.values_match? deep_fetch(actual, path), value + Cloudinary.values_match? value, deep_fetch(actual, path) end end end RSpec::Matchers.alias_matcher :have_deep_hash_values_of, :deep_hash_value module Cloudinary # @api private - def self.values_match?( actual, expected) + def self.values_match?(expected, actual) if Hash === actual return hashes_match?(expected, actual) if Hash === expected elsif Array === expected && Enumerable === actual && !(Struct === actual) return arrays_match?(expected, actual.to_a) elsif Regexp === expected \ No newline at end of file