aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2011-03-29 17:27:32 -0700
committerAaron Patterson <aaron.patterson@gmail.com>2011-03-29 17:27:32 -0700
commit58becf116580c37c63b89f4a660ebe293f6e7c4e (patch)
tree66bbbcda5476abe4cdf488d6886e8cc0e897db8a /activerecord/test
parent6067d29a1fd78a60c44f18d4c0815002ff2f8c84 (diff)
downloadrails-58becf116580c37c63b89f4a660ebe293f6e7c4e.tar.gz
rails-58becf116580c37c63b89f4a660ebe293f6e7c4e.tar.bz2
rails-58becf116580c37c63b89f4a660ebe293f6e7c4e.zip
order is not guaranteed by this select, so add an order and call first!
Diffstat (limited to 'activerecord/test')
-rw-r--r--activerecord/test/cases/finder_test.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/test/cases/finder_test.rb b/activerecord/test/cases/finder_test.rb
index 1ec00b15b2..014588b6d9 100644
--- a/activerecord/test/cases/finder_test.rb
+++ b/activerecord/test/cases/finder_test.rb
@@ -209,7 +209,7 @@ class FinderTest < ActiveRecord::TestCase
end
def test_model_class_responds_to_first_bang
- assert_equal topics(:first), Topic.first!
+ assert_equal topics(:first), Topic.order(:id).first!
assert_raises ActiveRecord::RecordNotFound do
Topic.delete_all
Topic.first!