aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJosé Valim <jose.valim@gmail.com>2011-06-10 00:29:50 -0700
committerJosé Valim <jose.valim@gmail.com>2011-06-10 00:29:50 -0700
commit2bda229c2fa16691efb06093613ce3232d49c1b1 (patch)
tree7b105292ff0ff4bc6b0d1c292f22aca9d4a7e21b
parent0b02284545dcbed7da40489e0db9bd49eca924b1 (diff)
parent06d772c0cea49d91eaa273469333430b317583bd (diff)
downloadrails-2bda229c2fa16691efb06093613ce3232d49c1b1.tar.gz
rails-2bda229c2fa16691efb06093613ce3232d49c1b1.tar.bz2
rails-2bda229c2fa16691efb06093613ce3232d49c1b1.zip
Merge pull request #1625 from neerajdotname/page_caching
Three minor fixes to tests
-rw-r--r--actionpack/test/controller/caching_test.rb4
-rw-r--r--actionpack/test/controller/content_type_test.rb1
2 files changed, 3 insertions, 2 deletions
diff --git a/actionpack/test/controller/caching_test.rb b/actionpack/test/controller/caching_test.rb
index 82c2c23607..da3314fe6d 100644
--- a/actionpack/test/controller/caching_test.rb
+++ b/actionpack/test/controller/caching_test.rb
@@ -127,7 +127,7 @@ class PageCachingTest < ActionController::TestCase
assert_equal 'I am xml', @response.body
end
- def test_should_cache_with_trailing_slash_on_url
+ def test_cached_page_should_not_have_trailing_slash_even_if_url_has_trailing_slash
@controller.class.cache_page 'cached content', '/page_caching_test/trailing_slash/'
assert File.exist?("#{FILE_STORE_PATH}/page_caching_test/trailing_slash.html")
end
@@ -141,7 +141,7 @@ class PageCachingTest < ActionController::TestCase
[:ok, :no_content, :found, :not_found].each do |status|
[:get, :post, :put, :delete].each do |method|
- unless method == :get and status == :ok
+ unless method == :get && status == :ok
define_method "test_shouldnt_cache_#{method}_with_#{status}_status" do
send(method, status)
assert_response status
diff --git a/actionpack/test/controller/content_type_test.rb b/actionpack/test/controller/content_type_test.rb
index b12c798302..d51882066d 100644
--- a/actionpack/test/controller/content_type_test.rb
+++ b/actionpack/test/controller/content_type_test.rb
@@ -74,6 +74,7 @@ class ContentTypeTest < ActionController::TestCase
get :render_defaults
assert_equal "utf-16", @response.charset
assert_equal Mime::HTML, @response.content_type
+ ensure
OldContentTypeController.default_charset = "utf-8"
end