Class: Bacon::Context
Instance Method Summary collapse
Instance Method Details
#hash_match(hash, obj) ⇒ Object
49 50 51 52 53 54 55 56 57 58 |
# File 'lib/spec/more.rb', line 49 def hash_match(hash, obj) hash.each do |k,v| if v.is_a?(Hash) hash_match(v, obj.send(k.to_sym)) else puts "#{k}: #{v} but was #{obj.send(k.to_sym)}" if obj.send(k.to_sym) != v obj.send(k.to_sym).should.equal v end end end |
#ok(arg) ⇒ Object
45 46 47 |
# File 'lib/spec/more.rb', line 45 def ok(arg) arg.should.equal true end |