test/hashr_test.rb in hashr-0.0.8 vs test/hashr_test.rb in hashr-0.0.9
- old
+ new
@@ -3,9 +3,13 @@
class HashrTest < Test::Unit::TestCase
def teardown
Hashr.raise_missing_keys = false
end
+ test 'initialize takes nil' do
+ assert_nothing_raised { Hashr.new(nil) }
+ end
+
test 'method access on an existing key returns the value' do
assert_equal 'foo', Hashr.new({ :foo => 'foo' }).foo
end
test 'method access on a non-existing key returns nil when raise_missing_keys is false' do