diff options
Diffstat (limited to 'activemodel/test/cases')
-rw-r--r-- | activemodel/test/cases/model_test.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/activemodel/test/cases/model_test.rb b/activemodel/test/cases/model_test.rb index d3e00b044f..d93fd96b88 100644 --- a/activemodel/test/cases/model_test.rb +++ b/activemodel/test/cases/model_test.rb @@ -16,4 +16,11 @@ class ModelTest < ActiveModel::TestCase object = BasicModel.new(:attr => "value") assert_equal object.attr, "value" end + + def test_initialize_with_nil_or_empty_hash_params_does_not_explode + assert_nothing_raised do + BasicModel.new() + BasicModel.new({}) + end + end end |