aboutsummaryrefslogtreecommitdiffstats
path: root/railties/test/application
diff options
context:
space:
mode:
authorPiotr Sarnacki <drogus@gmail.com>2012-01-15 16:37:46 +0100
committerPiotr Sarnacki <drogus@gmail.com>2012-01-15 16:37:46 +0100
commitf9f0f03822b4ead1a9b6fd9f314e363c65fb63e8 (patch)
treee5d6de26fbd09ddd26b32f2d3acfa700024be536 /railties/test/application
parentb164e81c1159baf35af3e22a9c6b43875c1fcf49 (diff)
downloadrails-f9f0f03822b4ead1a9b6fd9f314e363c65fb63e8.tar.gz
rails-f9f0f03822b4ead1a9b6fd9f314e363c65fb63e8.tar.bz2
rails-f9f0f03822b4ead1a9b6fd9f314e363c65fb63e8.zip
Fix railties tests
SchemaMigration model is loaded on rails initialization, which means that it will not be cleaned on each request.
Diffstat (limited to 'railties/test/application')
-rw-r--r--railties/test/application/loading_test.rb8
1 files changed, 4 insertions, 4 deletions
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