diff --git a/activerecord/test/cases/relations_test.rb b/activerecord/test/cases/relations_test.rb index 0cd838c0b0..4f6116203e 100644 --- a/activerecord/test/cases/relations_test.rb +++ b/activerecord/test/cases/relations_test.rb @@ -745,6 +745,11 @@ class RelationTest < ActiveRecord::TestCase end end + def test_relation_to_sql + sql = Post.first.comments.to_sql + assert_no_match(/\?/, sql) + end + def test_count posts = Post.all