diff options
author | Oscar Del Ben <info@oscardelben.com> | 2012-04-28 11:45:15 +0200 |
---|---|---|
committer | Oscar Del Ben <info@oscardelben.com> | 2012-04-28 11:45:15 +0200 |
commit | 4e69a1579ea74fe2823f6fb2f055db97480492e5 (patch) | |
tree | d8a5834a0ed5a372969f26db753a30785777a5c2 /activerecord/test/cases/attribute_methods_test.rb | |
parent | 943410197cca4235212ca0fc409820378a40890c (diff) | |
parent | 0297e8e4ddc034bcb8ed477efff91d8fe104cb39 (diff) | |
download | rails-4e69a1579ea74fe2823f6fb2f055db97480492e5.tar.gz rails-4e69a1579ea74fe2823f6fb2f055db97480492e5.tar.bz2 rails-4e69a1579ea74fe2823f6fb2f055db97480492e5.zip |
Merge branch 'master' of github.com:lifo/docrails
Diffstat (limited to 'activerecord/test/cases/attribute_methods_test.rb')
-rw-r--r-- | activerecord/test/cases/attribute_methods_test.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/activerecord/test/cases/attribute_methods_test.rb b/activerecord/test/cases/attribute_methods_test.rb index ef01476ae4..ab44dc8811 100644 --- a/activerecord/test/cases/attribute_methods_test.rb +++ b/activerecord/test/cases/attribute_methods_test.rb @@ -244,7 +244,7 @@ class AttributeMethodsTest < ActiveRecord::TestCase # DB2 is not case-sensitive return true if current_adapter?(:DB2Adapter) - assert_equal @loaded_fixtures['computers']['workstation'].to_hash, Computer.find(:first).attributes + assert_equal @loaded_fixtures['computers']['workstation'].to_hash, Computer.first.attributes end def test_hashes_not_mangled @@ -484,9 +484,9 @@ class AttributeMethodsTest < ActiveRecord::TestCase topic = Topic.create(:title => 'Budget') # Oracle does not support boolean expressions in SELECT if current_adapter?(:OracleAdapter) - topic = Topic.find(:first, :select => "topics.*, 0 as is_test") + topic = Topic.scoped(:select => "topics.*, 0 as is_test").first else - topic = Topic.find(:first, :select => "topics.*, 1=2 as is_test") + topic = Topic.scoped(:select => "topics.*, 1=2 as is_test").first end assert !topic.is_test? end @@ -495,9 +495,9 @@ class AttributeMethodsTest < ActiveRecord::TestCase topic = Topic.create(:title => 'Budget') # Oracle does not support boolean expressions in SELECT if current_adapter?(:OracleAdapter) - topic = Topic.find(:first, :select => "topics.*, 1 as is_test") + topic = Topic.scoped(:select => "topics.*, 1 as is_test").first else - topic = Topic.find(:first, :select => "topics.*, 2=2 as is_test") + topic = Topic.scoped(:select => "topics.*, 2=2 as is_test").first end assert topic.is_test? end |