aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/migration/column_attributes_test.rb
diff options
context:
space:
mode:
authorJon Leighton <j@jonathanleighton.com>2012-04-26 18:32:55 +0100
committerJon Leighton <j@jonathanleighton.com>2012-04-26 18:32:55 +0100
commit75f03eca753f1e835409a80db1f54f716ef48d18 (patch)
tree6ef084ea2ee7b44c574096274ab6d5fa7a308235 /activerecord/test/cases/migration/column_attributes_test.rb
parentb30996307d3b8d0d519c7ddcfa28fdeed428b602 (diff)
downloadrails-75f03eca753f1e835409a80db1f54f716ef48d18.tar.gz
rails-75f03eca753f1e835409a80db1f54f716ef48d18.tar.bz2
rails-75f03eca753f1e835409a80db1f54f716ef48d18.zip
remove calls to find(:first), find(:last) and find(:all)
Diffstat (limited to 'activerecord/test/cases/migration/column_attributes_test.rb')
-rw-r--r--activerecord/test/cases/migration/column_attributes_test.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/activerecord/test/cases/migration/column_attributes_test.rb b/activerecord/test/cases/migration/column_attributes_test.rb
index 040445ef12..409a558f5c 100644
--- a/activerecord/test/cases/migration/column_attributes_test.rb
+++ b/activerecord/test/cases/migration/column_attributes_test.rb
@@ -64,7 +64,7 @@ module ActiveRecord
end
# SELECT
- row = TestModel.find(:first)
+ row = TestModel.first
assert_kind_of BigDecimal, row.wealth
# If this assert fails, that means the SELECT is broken!
@@ -79,7 +79,7 @@ module ActiveRecord
TestModel.create :wealth => BigDecimal.new("12345678901234567890.0123456789")
# SELECT
- row = TestModel.find(:first)
+ row = TestModel.first
assert_kind_of BigDecimal, row.wealth
# If these asserts fail, that means the INSERT (create function, or cast to SQL) is broken!
@@ -132,7 +132,7 @@ module ActiveRecord
:birthday => 18.years.ago, :favorite_day => 10.days.ago,
:moment_of_truth => "1782-10-10 21:40:18", :male => true
- bob = TestModel.find(:first)
+ bob = TestModel.first
assert_equal 'bob', bob.first_name
assert_equal 'bobsen', bob.last_name
assert_equal "I was born ....", bob.bio