test/hashr_test.rb in hashr-0.0.15 vs test/hashr_test.rb in hashr-0.0.16
- old
+ new
@@ -176,7 +176,15 @@
self[:count]
end
end
assert_equal 5, hashr.count
end
+
+ test 'to_hash converts the Hashr instance and all of its children to Hashes' do
+ hash = Hashr.new(:foo => { :bar => { :baz => 'baz' } }).to_hash
+
+ assert hash.instance_of?(Hash)
+ assert hash[:foo].instance_of?(Hash)
+ assert hash[:foo][:bar].instance_of?(Hash)
+ end
end