Class: RSpec::FuzzyHash

Inherits:
Hash
  • Object
show all
Defined in:
lib/rspec_ext/nokogiri.rb

Instance Method Summary collapse

Instance Method Details

#==(o) ⇒ Object



5
6
7
8
9
10
11
12
13
14
15
16
# File 'lib/rspec_ext/nokogiri.rb', line 5

def == o
  return true if super

  if o.respond_to? :each
    o.each do |k, v|
      return false if (self[k.to_sym] || self[k.to_s]) != v
    end
    return true
  end

  false
end