diff options
author | Michael Koziarski <michael@koziarski.com> | 2008-02-13 02:19:46 +0000 |
---|---|---|
committer | Michael Koziarski <michael@koziarski.com> | 2008-02-13 02:19:46 +0000 |
commit | 08a4c9979da44654f057494dc76498ed6a8506bc (patch) | |
tree | decf0d8dd6c8715f57d59923543fb193dec8ede7 /activerecord/test/cases | |
parent | 46356100d1518c67d005be1fecceb9aea4c72dfd (diff) | |
download | rails-08a4c9979da44654f057494dc76498ed6a8506bc.tar.gz rails-08a4c9979da44654f057494dc76498ed6a8506bc.tar.bz2 rails-08a4c9979da44654f057494dc76498ed6a8506bc.zip |
Remove options from the attributes method, tidy up the implementation. Closes #11093 [juanjo.bazan, Koz]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8863 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activerecord/test/cases')
-rwxr-xr-x | activerecord/test/cases/base_test.rb | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/activerecord/test/cases/base_test.rb b/activerecord/test/cases/base_test.rb index e98a756870..9fde3130bd 100755 --- a/activerecord/test/cases/base_test.rb +++ b/activerecord/test/cases/base_test.rb @@ -1778,23 +1778,6 @@ class BasicsTest < ActiveRecord::TestCase assert xml.include?(%(<arbitrary-element>#{value}</arbitrary-element>)) end - def test_except_attributes - assert_equal( - %w( author_name type id approved replies_count bonus_time written_on content author_email_address parent_id last_read).sort, - topics(:first).attributes(:except => :title).keys.sort - ) - - assert_equal( - %w( replies_count bonus_time written_on content author_email_address parent_id last_read).sort, - topics(:first).attributes(:except => [ :title, :id, :type, :approved, :author_name ]).keys.sort - ) - end - - def test_include_attributes - assert_equal(%w( title ), topics(:first).attributes(:only => :title).keys) - assert_equal(%w( title author_name type id approved ).sort, topics(:first).attributes(:only => [ :title, :id, :type, :approved, :author_name ]).keys.sort) - end - def test_type_name_with_module_should_handle_beginning assert_equal 'ActiveRecord::Person', ActiveRecord::Base.send(:type_name_with_module, 'Person') assert_equal '::Person', ActiveRecord::Base.send(:type_name_with_module, '::Person') |