diff options
author | Rafael França <rafaelmfranca@gmail.com> | 2017-06-02 14:22:46 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-06-02 14:22:46 -0400 |
commit | 88ae9bf174d583153dfd93cfe3b916dfcdd16413 (patch) | |
tree | d0b888810e0b4744db0b4d8957ab06385dd349ad /activerecord | |
parent | 62d316c6d88595940d6da08b3e6c97f9ca2aec1d (diff) | |
parent | db507c3fc06963b3a9c005b9057ef79ed8dd2d6f (diff) | |
download | rails-88ae9bf174d583153dfd93cfe3b916dfcdd16413.tar.gz rails-88ae9bf174d583153dfd93cfe3b916dfcdd16413.tar.bz2 rails-88ae9bf174d583153dfd93cfe3b916dfcdd16413.zip |
Merge pull request #29332 from yahonda/unlock-minitest_unknown_type_fix
Clean up `type_map` at the end of test_respond_to_for_non_selected_element
Diffstat (limited to 'activerecord')
-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 |