Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Moved perform_caching test set up into test's setup to fix a dependen…
…ce fragility (closes #7640)

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6230 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information
dhh committed Feb 25, 2007
1 parent ee2b5dd commit 793c9ff
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion actionpack/test/controller/caching_test.rb
Expand Up @@ -4,7 +4,6 @@
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

Expand All @@ -30,6 +29,8 @@ def not_found

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
Expand All @@ -51,6 +52,8 @@ def setup

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
Expand Down

0 comments on commit 793c9ff

Please sign in to comment.