From f9f0f03822b4ead1a9b6fd9f314e363c65fb63e8 Mon Sep 17 00:00:00 2001 From: Piotr Sarnacki Date: Sun, 15 Jan 2012 16:37:46 +0100 Subject: Fix railties tests SchemaMigration model is loaded on rails initialization, which means that it will not be cleaned on each request. --- railties/test/application/loading_test.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'railties/test/application') diff --git a/railties/test/application/loading_test.rb b/railties/test/application/loading_test.rb index 457e81e174..5ad51f8476 100644 --- a/railties/test/application/loading_test.rb +++ b/railties/test/application/loading_test.rb @@ -63,7 +63,7 @@ class LoadingTest < ActiveSupport::TestCase assert ::AppTemplate::Application.config.loaded end - test "descendants are cleaned on each request without cache classes" do + test "descendants loaded after framework initialization are cleaned on each request without cache classes" do add_to_config <<-RUBY config.cache_classes = false config.reload_classes_only_on_change = false @@ -87,11 +87,11 @@ class LoadingTest < ActiveSupport::TestCase require "#{rails_root}/config/environment" setup_ar! - assert_equal [], ActiveRecord::Base.descendants + assert_equal [ActiveRecord::SchemaMigration], ActiveRecord::Base.descendants get "/load" - assert_equal [Post], ActiveRecord::Base.descendants + assert_equal [ActiveRecord::SchemaMigration, Post], ActiveRecord::Base.descendants get "/unload" - assert_equal [], ActiveRecord::Base.descendants + assert_equal [ActiveRecord::SchemaMigration], ActiveRecord::Base.descendants end test "initialize_cant_be_called_twice" do -- cgit v1.2.3