diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2004-12-07 12:18:33 +0000 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2004-12-07 12:18:33 +0000 |
commit | 465e0c0c2635588927ca707e6220cd7f232b3f17 (patch) | |
tree | 20ebc94d46285290708737ce56bbb7bc1c3a26c4 /actionpack/lib/action_controller/assertions | |
parent | 1e4a936bd08f330062fedf2a32110f23ade0a322 (diff) | |
download | rails-465e0c0c2635588927ca707e6220cd7f232b3f17.tar.gz rails-465e0c0c2635588927ca707e6220cd7f232b3f17.tar.bz2 rails-465e0c0c2635588927ca707e6220cd7f232b3f17.zip |
Added the possibility of having validate be protected for assert_(in)valid_column #263 [Tobias Luetke]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@67 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/lib/action_controller/assertions')
-rw-r--r-- | actionpack/lib/action_controller/assertions/active_record_assertions.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/actionpack/lib/action_controller/assertions/active_record_assertions.rb b/actionpack/lib/action_controller/assertions/active_record_assertions.rb index 9167eae53e..cdc9b6951d 100644 --- a/actionpack/lib/action_controller/assertions/active_record_assertions.rb +++ b/actionpack/lib/action_controller/assertions/active_record_assertions.rb @@ -22,7 +22,7 @@ module Test #:nodoc: # Assert the template object with the given name is an Active Record descendant and the specified column(s) are valid. def assert_valid_column_on_record(key = nil, columns = "", message = nil) record = find_record_in_template(key) - record.validate + record.send(:validate) cols = glue_columns(columns) cols.delete_if { |col| !record.errors.invalid?(col) } @@ -33,7 +33,7 @@ module Test #:nodoc: # Assert the template object with the given name is an Active Record descendant and the specified column(s) are invalid. def assert_invalid_column_on_record(key = nil, columns = "", message = nil) record = find_record_in_template(key) - record.validate + record.send(:validate) cols = glue_columns(columns) cols.delete_if { |col| record.errors.invalid?(col) } |