aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2012-01-05 16:42:28 -0800
committerAaron Patterson <aaron.patterson@gmail.com>2012-01-05 17:05:43 -0800
commit38a0606d9b1b801a62cd7f8492638931b30d66a5 (patch)
tree22e3ef8373bb043a36ed255dd5114382f589f993 /activerecord/test
parentc0d1f5f85bff58fc2f91a49e298f589dcaba81ee (diff)
downloadrails-38a0606d9b1b801a62cd7f8492638931b30d66a5.tar.gz
rails-38a0606d9b1b801a62cd7f8492638931b30d66a5.tar.bz2
rails-38a0606d9b1b801a62cd7f8492638931b30d66a5.zip
test a subclass so that the removed method does not imact other tests
Diffstat (limited to 'activerecord/test')
-rw-r--r--activerecord/test/cases/session_store/session_test.rb7
1 files changed, 5 insertions, 2 deletions
diff --git a/activerecord/test/cases/session_store/session_test.rb b/activerecord/test/cases/session_store/session_test.rb
index bcacbb9b5f..a3b8ab74d9 100644
--- a/activerecord/test/cases/session_store/session_test.rb
+++ b/activerecord/test/cases/session_store/session_test.rb
@@ -7,10 +7,13 @@ module ActiveRecord
class SessionTest < ActiveRecord::TestCase
self.use_transactional_fixtures = false
+ attr_reader :session_klass
+
def setup
super
ActiveRecord::Base.connection.schema_cache.clear!
Session.drop_table! if Session.table_exists?
+ @session_klass = Class.new(Session)
end
def test_data_column_name
@@ -61,8 +64,8 @@ module ActiveRecord
def test_find_by_session_id
Session.create_table!
session_id = "10"
- s = Session.create!(:data => 'world', :session_id => session_id)
- t = Session.find_by_session_id(session_id)
+ s = session_klass.create!(:data => 'world', :session_id => session_id)
+ t = session_klass.find_by_session_id(session_id)
assert_equal s, t
assert_equal s.data, t.data
Session.drop_table!