diff options
-rw-r--r-- | activerecord/test/cases/relation_test.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/activerecord/test/cases/relation_test.rb b/activerecord/test/cases/relation_test.rb index 5fb32270b7..17198247a9 100644 --- a/activerecord/test/cases/relation_test.rb +++ b/activerecord/test/cases/relation_test.rb @@ -3,9 +3,12 @@ require "models/post" require "models/comment" require "models/author" require "models/rating" +require "support/connection_helper" module ActiveRecord class RelationTest < ActiveRecord::TestCase + include ConnectionHelper + fixtures :posts, :comments, :authors, :author_addresses FakeKlass = Struct.new(:table_name, :name) do @@ -250,6 +253,8 @@ module ActiveRecord silence_warnings { post = Post.select("'title' as post_title").first } assert_equal false, post.respond_to?(:title), "post should not respond_to?(:body) since invoking it raises exception" + ensure + reset_connection end def test_select_quotes_when_using_from_clause |