Skip to content

Commit 560ec10

Browse files
author
Anna
committed
troubleshooting failing test
1 parent 79b0aee commit 560ec10

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

test/cases/finder_test_sqlserver.rb

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22
require 'models/event'
33
require 'models/author'
44
require 'models/post'
5+
require 'models/categorization'
56
require 'models_sqlserver/topic'
7+
# require 'cases/finder_test.rb'
68

79
class FinderTestSqlserver < ActiveRecord::TestCase
810
end
@@ -20,15 +22,18 @@ class FinderTest < ActiveRecord::TestCase
2022
include SqlserverCoercedTest
2123

2224

25+
# TODO This test passes in rails 4.0.0 but not 4.0.1-2
2326
def test_coerced_find_with_order_on_included_associations_with_construct_finder_sql_for_association_limiting_and_is_distinct
2427
p = Post.all.merge!(:includes => { :authors => :author_address },
2528
:order => 'author_addresses.id DESC ',
2629
:limit => 2)
27-
arel_to_png(p)
28-
assert_equal 2, p.to_a.size
29-
puts "*****#{ActiveRecord::SQLCounter.log_all.join("\n\n")}"
30+
# ar_version = Gem.loaded_specs['activerecord'].version.version
31+
# arel_to_png(p, "#{ar_version}")
32+
count = p.to_a.size
33+
#puts "*****#{ActiveRecord::SQLCounter.log_all.join("\n\n")}"
34+
assert_equal 2, count
3035

31-
assert_equal 3, Post.all.merge!(:includes => { :author => :author_address, :authors => :author_address},
36+
assert_equal 3, Post.all.merge!(:includes => { :author => :author_address, :authors => :author_address},
3237
:order => 'author_addresses_authors.id DESC ', :limit => 3).to_a.size
3338
end
3439

0 commit comments

Comments
 (0)