diff options
author | Sean Griffin <sean@seantheprogrammer.com> | 2015-01-24 06:38:23 -0700 |
---|---|---|
committer | Sean Griffin <sean@seantheprogrammer.com> | 2015-01-24 06:38:23 -0700 |
commit | 9bf9097973c083b23305fe3dddfb359f7049fec9 (patch) | |
tree | b2bac4f265e248a67418d10a90437013e93c6341 /activemodel/test | |
parent | 847395a04df52a389823ff4367c4b002cdbb5c6a (diff) | |
parent | 5bdb42159ec461d678652319da14b4a59bfafd27 (diff) | |
download | rails-9bf9097973c083b23305fe3dddfb359f7049fec9.tar.gz rails-9bf9097973c083b23305fe3dddfb359f7049fec9.tar.bz2 rails-9bf9097973c083b23305fe3dddfb359f7049fec9.zip |
Merge pull request #18663 from egilburg/reuse-attribute-assignment
Use attribute assignment module logic during ActiveModel initialization.
Diffstat (limited to 'activemodel/test')
-rw-r--r-- | activemodel/test/cases/model_test.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/activemodel/test/cases/model_test.rb b/activemodel/test/cases/model_test.rb index ee0fa26546..9a8d873ec9 100644 --- a/activemodel/test/cases/model_test.rb +++ b/activemodel/test/cases/model_test.rb @@ -70,6 +70,8 @@ class ModelTest < ActiveModel::TestCase end def test_mixin_initializer_when_args_dont_exist - assert_raises(NoMethodError) { SimpleModel.new(hello: 'world') } + assert_raises(ActiveModel::AttributeAssignment::UnknownAttributeError) do + SimpleModel.new(hello: 'world') + end end end |