aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases
diff options
context:
space:
mode:
authorJon Leighton <j@jonathanleighton.com>2011-12-23 00:36:54 +0000
committerJon Leighton <j@jonathanleighton.com>2011-12-24 11:08:15 +0000
commit7293cac8548fb8083f718922d8d3ca9b3a18767f (patch)
tree697e322a294d1233c9da2437bb503d28446c29f2 /activerecord/test/cases
parent6af7192af59602e1cbb341b8bf3452afb344eff2 (diff)
downloadrails-7293cac8548fb8083f718922d8d3ca9b3a18767f.tar.gz
rails-7293cac8548fb8083f718922d8d3ca9b3a18767f.tar.bz2
rails-7293cac8548fb8083f718922d8d3ca9b3a18767f.zip
Extract common logic into a method
Diffstat (limited to 'activerecord/test/cases')
-rw-r--r--activerecord/test/cases/attribute_methods/read_test.rb1
-rw-r--r--activerecord/test/cases/connection_adapters/connection_handler_test.rb3
2 files changed, 4 insertions, 0 deletions
diff --git a/activerecord/test/cases/attribute_methods/read_test.rb b/activerecord/test/cases/attribute_methods/read_test.rb
index 7665f1c12e..0df9ffc0c5 100644
--- a/activerecord/test/cases/attribute_methods/read_test.rb
+++ b/activerecord/test/cases/attribute_methods/read_test.rb
@@ -15,6 +15,7 @@ module ActiveRecord
def setup
@klass = Class.new do
def self.superclass; Base; end
+ def self.active_record_super; Base; end
def self.base_class; self; end
include ActiveRecord::AttributeMethods
diff --git a/activerecord/test/cases/connection_adapters/connection_handler_test.rb b/activerecord/test/cases/connection_adapters/connection_handler_test.rb
index 04d543fea9..dc99ac665c 100644
--- a/activerecord/test/cases/connection_adapters/connection_handler_test.rb
+++ b/activerecord/test/cases/connection_adapters/connection_handler_test.rb
@@ -8,6 +8,9 @@ module ActiveRecord
@handler.establish_connection 'america', Base.connection_pool.spec
@klass = Class.new do
def self.name; 'america'; end
+ class << self
+ alias active_record_super superclass
+ end
end
@subklass = Class.new(@klass) do
def self.name; 'north america'; end