aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/base_test.rb
diff options
context:
space:
mode:
authorMark Thomson <nzl216@gmail.com>2012-03-17 22:29:46 -0500
committerMark Thomson <nzl216@gmail.com>2012-03-17 22:29:46 -0500
commitf2bc404ba82431d32a35b4de15cb21f179bc24c7 (patch)
treeca58ce1118eeda244ced0ef0a1d94ed7ca38e5e0 /activerecord/test/cases/base_test.rb
parent98b4ef730696062b624c508d22ca76d9caa018cc (diff)
parent6ce54d4ba8c220a84e55e7dd798d364c3f48d9f7 (diff)
downloadrails-f2bc404ba82431d32a35b4de15cb21f179bc24c7.tar.gz
rails-f2bc404ba82431d32a35b4de15cb21f179bc24c7.tar.bz2
rails-f2bc404ba82431d32a35b4de15cb21f179bc24c7.zip
Merge remote-tracking branch 'origin/master'
Diffstat (limited to 'activerecord/test/cases/base_test.rb')
-rw-r--r--activerecord/test/cases/base_test.rb14
1 files changed, 12 insertions, 2 deletions
diff --git a/activerecord/test/cases/base_test.rb b/activerecord/test/cases/base_test.rb
index 01f647b261..bddaf6afa8 100644
--- a/activerecord/test/cases/base_test.rb
+++ b/activerecord/test/cases/base_test.rb
@@ -1139,7 +1139,7 @@ class BasicsTest < ActiveRecord::TestCase
assert g.save
# Reload and check that we have all the geometric attributes.
- h = ActiveRecord::IdentityMap.without { Geometric.find(g.id) }
+ h = Geometric.find(g.id)
assert_equal '(5,6.1)', h.a_point
assert_equal '[(2,3),(5.5,7)]', h.a_line_segment
@@ -1168,7 +1168,7 @@ class BasicsTest < ActiveRecord::TestCase
assert g.save
# Reload and check that we have all the geometric attributes.
- h = ActiveRecord::IdentityMap.without { Geometric.find(g.id) }
+ h = Geometric.find(g.id)
assert_equal '(5,6.1)', h.a_point
assert_equal '[(2,3),(5.5,7)]', h.a_line_segment
@@ -1503,6 +1503,16 @@ class BasicsTest < ActiveRecord::TestCase
assert_equal before_seq, after_seq unless before_seq.blank? && after_seq.blank?
end
+ def test_dont_clear_inheritnce_column_when_setting_explicitly
+ Joke.inheritance_column = "my_type"
+ before_inherit = Joke.inheritance_column
+
+ Joke.reset_column_information
+ after_inherit = Joke.inheritance_column
+
+ assert_equal before_inherit, after_inherit unless before_inherit.blank? && after_inherit.blank?
+ end
+
def test_set_table_name_symbol_converted_to_string
Joke.table_name = :cold_jokes
assert_equal 'cold_jokes', Joke.table_name