diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2007-02-25 19:53:14 +0000 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2007-02-25 19:53:14 +0000 |
commit | 793c9ff68ddb928d80d5bb1c766881cd7003976c (patch) | |
tree | 52d59d511ad6ddb5e1e6e57a7bb13855b8fbe06b | |
parent | ee2b5dda803d4da31b187eb592569692b4972417 (diff) | |
download | rails-793c9ff68ddb928d80d5bb1c766881cd7003976c.tar.gz rails-793c9ff68ddb928d80d5bb1c766881cd7003976c.tar.bz2 rails-793c9ff68ddb928d80d5bb1c766881cd7003976c.zip |
Moved perform_caching test set up into test's setup to fix a dependence fragility (closes #7640)
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6230 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
-rw-r--r-- | actionpack/test/controller/caching_test.rb | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/actionpack/test/controller/caching_test.rb b/actionpack/test/controller/caching_test.rb index 07e16896bd..53db8ad843 100644 --- a/actionpack/test/controller/caching_test.rb +++ b/actionpack/test/controller/caching_test.rb @@ -4,7 +4,6 @@ require File.dirname(__FILE__) + '/../abstract_unit' CACHE_DIR = 'test_cache' # Don't change '/../temp/' cavalierly or you might hoze something you don't want hozed FILE_STORE_PATH = File.join(File.dirname(__FILE__), '/../temp/', CACHE_DIR) -ActionController::Base.perform_caching = true ActionController::Base.page_cache_directory = FILE_STORE_PATH ActionController::Base.fragment_cache_store = :file_store, FILE_STORE_PATH @@ -30,6 +29,8 @@ end class PageCachingTest < Test::Unit::TestCase def setup + ActionController::Base.perform_caching = true + ActionController::Routing::Routes.draw do |map| map.main '', :controller => 'posts' map.resources :posts @@ -51,6 +52,8 @@ class PageCachingTest < Test::Unit::TestCase def teardown FileUtils.rm_rf(File.dirname(FILE_STORE_PATH)) + + ActionController::Base.perform_caching = false end def test_page_caching_resources_saves_to_correct_path_with_extension_even_if_default_route |