Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix postgresql AR test failure
Due to the ordering of the returning result set, the test fails under the postgresql adapter. Order results by id prior to checking the first item

[#3542 state:committed]

Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
  • Loading branch information
John Pignata authored and jeremy committed Dec 11, 2009
1 parent 2297eae commit 96deaba
Showing 1 changed file with 2 additions and 2 deletions.
Expand Up @@ -1180,11 +1180,11 @@ def test_creating_using_primary_key
end

def test_normal_method_call_in_association_proxy
assert_equal 'Welcome to the weblog', Comment.all.map { |comment| comment.post }.first.title
assert_equal 'Welcome to the weblog', Comment.all.map { |comment| comment.post }.sort_by(&:id).first.title
end

def test_instance_eval_in_association_proxy
assert_equal 'Welcome to the weblog', Comment.all.map { |comment| comment.post }.first.instance_eval{title}
assert_equal 'Welcome to the weblog', Comment.all.map { |comment| comment.post }.sort_by(&:id).first.instance_eval{title}
end
end

0 comments on commit 96deaba

Please sign in to comment.