mirror of
https://github.com/github/rails.git
synced 2026-04-26 03:00:59 -04:00
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.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user