diff options
author | dreamfall <amarant.st@gmail.com> | 2012-01-17 13:18:58 +0300 |
---|---|---|
committer | dreamfall <amarant.st@gmail.com> | 2012-01-17 13:18:58 +0300 |
commit | e84998cc212c6c96c279ebd41619f51054f5642f (patch) | |
tree | 50166de246f6060b8ed83dc121f60ebc3b1cdf94 /activemodel/test | |
parent | 5f8274efe128ffeec8fa3179460f5167a078f007 (diff) | |
download | rails-e84998cc212c6c96c279ebd41619f51054f5642f.tar.gz rails-e84998cc212c6c96c279ebd41619f51054f5642f.tar.bz2 rails-e84998cc212c6c96c279ebd41619f51054f5642f.zip |
validates method should not change options argument
Diffstat (limited to 'activemodel/test')
-rw-r--r-- | activemodel/test/cases/validations_test.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/activemodel/test/cases/validations_test.rb b/activemodel/test/cases/validations_test.rb index 2f4376bd41..ed4d8fcdca 100644 --- a/activemodel/test/cases/validations_test.rb +++ b/activemodel/test/cases/validations_test.rb @@ -330,4 +330,10 @@ class ValidationsTest < ActiveModel::TestCase Topic.new.valid? end end + + def test_does_not_modify_options_argument + options = {:presence => true} + Topic.validates :title, options + assert_equal({:presence => true}, options) + end end |