diff options
author | José Valim <jose.valim@gmail.com> | 2009-12-23 00:36:51 +0100 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2009-12-23 00:36:51 +0100 |
commit | f1085f41287687835659fa23079080204fe32e96 (patch) | |
tree | 8d8899c556c2b4aec9e377f842c15fe0a51416fd /activemodel/test | |
parent | 2476c5312dcbd29f49672f71617a3d34c6a60cc7 (diff) | |
download | rails-f1085f41287687835659fa23079080204fe32e96.tar.gz rails-f1085f41287687835659fa23079080204fe32e96.tar.bz2 rails-f1085f41287687835659fa23079080204fe32e96.zip |
Move validations in ActiveModel to validators, however all validatity checks are still in the class method.
Diffstat (limited to 'activemodel/test')
-rw-r--r-- | activemodel/test/cases/validations/with_validation_test.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/activemodel/test/cases/validations/with_validation_test.rb b/activemodel/test/cases/validations/with_validation_test.rb index 4350ad69ec..953ff8aa2d 100644 --- a/activemodel/test/cases/validations/with_validation_test.rb +++ b/activemodel/test/cases/validations/with_validation_test.rb @@ -98,10 +98,10 @@ class ValidatesWithTest < ActiveRecord::TestCase assert topic.errors[:base].include?(ERROR_MESSAGE) end - test "passes all non-standard configuration options to the validator class" do + test "passes all configuration options to the validator class" do topic = Topic.new validator = mock() - validator.expects(:new).with({:foo => :bar}).returns(validator) + validator.expects(:new).with(:foo => :bar, :if => "1 == 1").returns(validator) validator.expects(:validate).with(topic) Topic.validates_with(validator, :if => "1 == 1", :foo => :bar) |