diff options
author | Jon Leighton <j@jonathanleighton.com> | 2011-09-11 16:07:24 +0100 |
---|---|---|
committer | Jon Leighton <j@jonathanleighton.com> | 2011-09-13 00:01:58 +0100 |
commit | cf115d2f8ef48764e095aa453f729b60705088f1 (patch) | |
tree | 62c1d5d4d9761ae8c902121729dab3cab176d526 /activerecord/test | |
parent | eecfa84a9065da2b1bd1e02f37e8653a2825c624 (diff) | |
download | rails-cf115d2f8ef48764e095aa453f729b60705088f1.tar.gz rails-cf115d2f8ef48764e095aa453f729b60705088f1.tar.bz2 rails-cf115d2f8ef48764e095aa453f729b60705088f1.zip |
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.
Diffstat (limited to 'activerecord/test')
-rw-r--r-- | activerecord/test/cases/session_store/session_test.rb | 2 |
1 files changed, 2 insertions, 0 deletions
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 |