(Sorry to have to ask this here, but dev.rubyonrails.org is 404 for me
right now.)
I understand the #7615 patch deals with the different order of reading
files across different filesystems. I'm an Ubuntu Linux user brand new
to the Edge and had "rake test" fails in actionpack related to this
too. I'm sure that #7615 fixes the cached javascript/stylesheet
problems I saw.
I was wondering whether it also addressed another failure that stems
from the same dir listing order issue:
> test_should_cache_get_with_ok_status(PageCachingTest)
> get with ok status should have been cached.
The test passes when run on its own, but fails under "rake test" on my
Ubuntu box since it does its initialization of
ActionController::Base.perform_caching at the top of the file rather
than using setup/teardown. The asset helper test plays with the same
setting and I expect the caching test is passing for people on other
platforms because of the order rake reads and runs the tests in.
The fix is obvious:
Index: actionpack/test/controller/caching_test.rb
===================================================================
--- actionpack/test/controller/caching_test.rb (revision 6225)
+++ actionpack/test/controller/caching_test.rb (working copy)
@@ -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
@@ -30,6 +29,8 @@
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 @@
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
I'll happily submit this properly once Trac reappears for me, but
wanted first to check whether Caio had already dealt with it in #7615.
Thanks,
--Anthony.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Core" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-core?hl=en
-~----------~----~----~----~------~----~------~--~---