diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2006-02-27 00:27:48 +0000 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2006-02-27 00:27:48 +0000 |
commit | 1a06d324df43bfb3287293934f0ef34a7c790a34 (patch) | |
tree | 7c460eb0fa5663cf04deb87e443d6801ed6355f1 /activerecord/test | |
parent | 660952e5b0a50fb55c1b2f3d7fbe85d7eb9c86cc (diff) | |
download | rails-1a06d324df43bfb3287293934f0ef34a7c790a34.tar.gz rails-1a06d324df43bfb3287293934f0ef34a7c790a34.tar.bz2 rails-1a06d324df43bfb3287293934f0ef34a7c790a34.zip |
Define attribute query methods to avoid method_missing calls. Closes #3677.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3679 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activerecord/test')
-rwxr-xr-x | activerecord/test/base_test.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/activerecord/test/base_test.rb b/activerecord/test/base_test.rb index 4349d92eeb..4cdf24c03d 100755 --- a/activerecord/test/base_test.rb +++ b/activerecord/test/base_test.rb @@ -1163,7 +1163,8 @@ class BasicsTest < Test::Unit::TestCase private def assert_readers(model, exceptions) - expected_readers = model.column_names - (model.serialized_attributes.keys + exceptions + ['id']) - assert_equal expected_readers.sort, model.read_methods.to_a.sort + expected_readers = Set.new(model.column_names - (model.serialized_attributes.keys + exceptions + ['id'])) + expected_readers += expected_readers.map { |col| "#{col}?" } + assert_equal expected_readers, model.read_methods end end |