test/hashr_test.rb in hashr-0.0.9 vs test/hashr_test.rb in hashr-0.0.10

- old
+ new

@@ -127,7 +127,16 @@ klass = Class.new(Hashr) do define :foo => { :_include => Module.new { def helper; 'helper'; end } } end assert_equal 'helper', klass.new.foo.helper end + + test 'anonymously overwriting core Hash methods' do + hashr = Hashr.new(:count => 5) do + def count + self[:count] + end + end + assert_equal 5, hashr.count + end end