From a0dfd84440f28d2862b7eb7ea340ca28d98fb23f Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Thu, 14 Mar 2013 22:27:59 -0700 Subject: safely publish columns and columns hash info --- .../cases/connection_adapters/schema_cache_test.rb | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'activerecord/test/cases/connection_adapters') diff --git a/activerecord/test/cases/connection_adapters/schema_cache_test.rb b/activerecord/test/cases/connection_adapters/schema_cache_test.rb index 541e983758..c202659480 100644 --- a/activerecord/test/cases/connection_adapters/schema_cache_test.rb +++ b/activerecord/test/cases/connection_adapters/schema_cache_test.rb @@ -9,28 +9,28 @@ module ActiveRecord end def test_primary_key - assert_equal 'id', @cache.primary_keys['posts'] + assert_equal 'id', @cache.primary_keys('posts') end def test_primary_key_for_non_existent_table - assert_nil @cache.primary_keys['omgponies'] + assert_nil @cache.primary_keys('omgponies') end def test_caches_columns - columns = @cache.columns['posts'] - assert_equal columns, @cache.columns['posts'] + columns = @cache.columns('posts') + assert_equal columns, @cache.columns('posts') end def test_caches_columns_hash - columns_hash = @cache.columns_hash['posts'] - assert_equal columns_hash, @cache.columns_hash['posts'] + columns_hash = @cache.columns_hash('posts') + assert_equal columns_hash, @cache.columns_hash('posts') end def test_clearing @cache.columns['posts'] @cache.columns_hash['posts'] @cache.tables['posts'] - @cache.primary_keys['posts'] + @cache.primary_keys('posts') @cache.clear! @@ -44,14 +44,14 @@ module ActiveRecord @cache.columns['posts'] @cache.columns_hash['posts'] @cache.tables['posts'] - @cache.primary_keys['posts'] + @cache.primary_keys('posts') @cache = Marshal.load(Marshal.dump(@cache)) assert_equal 12, @cache.columns['posts'].size assert_equal 12, @cache.columns_hash['posts'].size assert @cache.tables['posts'] - assert_equal 'id', @cache.primary_keys['posts'] + assert_equal 'id', @cache.primary_keys('posts') end end -- cgit v1.2.3