From cf115d2f8ef48764e095aa453f729b60705088f1 Mon Sep 17 00:00:00 2001 From: Jon Leighton Date: Sun, 11 Sep 2011 16:07:24 +0100 Subject: Reset column info when messing with columns. We are subclassing Session here, but messing with the columns will affect the attribute methods defined on the Session superclass, and therefore other tests, unless we properly isolate it by resetting column info before and after the test run. --- activerecord/test/cases/session_store/session_test.rb | 2 ++ 1 file changed, 2 insertions(+) (limited to 'activerecord/test/cases/session_store/session_test.rb') diff --git a/activerecord/test/cases/session_store/session_test.rb b/activerecord/test/cases/session_store/session_test.rb index 669c0b7b4d..258cee7aba 100644 --- a/activerecord/test/cases/session_store/session_test.rb +++ b/activerecord/test/cases/session_store/session_test.rb @@ -36,6 +36,7 @@ module ActiveRecord end def test_find_by_sess_id_compat + Session.reset_column_information klass = Class.new(Session) do def self.session_id_column 'sessid' @@ -53,6 +54,7 @@ module ActiveRecord assert_equal session.sessid, found.session_id ensure klass.drop_table! + Session.reset_column_information end def test_find_by_session_id -- cgit v1.2.3