aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test
diff options
context:
space:
mode:
authorRoberto Soares <roberto.tech@gmail.com>2012-11-23 18:10:18 -0300
committerRoberto Soares <roberto.tech@gmail.com>2012-11-23 18:14:35 -0300
commit2d6c4ec731861225779f3106f038effb17a27b21 (patch)
tree9282faa66f30aff799ea75ce6d5c5293083aaa7f /actionpack/test
parent20723ca49873076d8fc8c2bf0729568373e31738 (diff)
downloadrails-2d6c4ec731861225779f3106f038effb17a27b21.tar.gz
rails-2d6c4ec731861225779f3106f038effb17a27b21.tar.bz2
rails-2d6c4ec731861225779f3106f038effb17a27b21.zip
`assert_template` fails with empty string.
Diffstat (limited to 'actionpack/test')
-rw-r--r--actionpack/test/controller/action_pack_assertions_test.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/actionpack/test/controller/action_pack_assertions_test.rb b/actionpack/test/controller/action_pack_assertions_test.rb
index c653f7e756..5f559e5b00 100644
--- a/actionpack/test/controller/action_pack_assertions_test.rb
+++ b/actionpack/test/controller/action_pack_assertions_test.rb
@@ -454,6 +454,13 @@ class AssertTemplateTest < ActionController::TestCase
end
end
+ def test_with_empty_string_fails_when_no_template_rendered
+ get :nothing
+ assert_raise(ActiveSupport::TestCase::Assertion) do
+ assert_template ""
+ end
+ end
+
def test_passes_with_correct_string
get :hello_world
assert_template 'hello_world'