aboutsummaryrefslogtreecommitdiffstats
path: root/actionview
diff options
context:
space:
mode:
authorkenta-s <knt01222@gmail.com>2017-01-20 07:08:23 +0900
committerkenta-s <knt01222@gmail.com>2017-01-20 07:08:24 +0900
commita35aeaaa63332d6976a372e9e225adf086844ff1 (patch)
tree6d17eb8b3021b2d08ee95dfe7221afcf356d8165 /actionview
parentdbeed41e5d11ed661dd2ee065c8fcdb76a555838 (diff)
downloadrails-a35aeaaa63332d6976a372e9e225adf086844ff1.tar.gz
rails-a35aeaaa63332d6976a372e9e225adf086844ff1.tar.bz2
rails-a35aeaaa63332d6976a372e9e225adf086844ff1.zip
Add missing tests for ActionView::Template::Text
Diffstat (limited to 'actionview')
-rw-r--r--actionview/test/template/text_test.rb16
1 files changed, 16 insertions, 0 deletions
diff --git a/actionview/test/template/text_test.rb b/actionview/test/template/text_test.rb
index ee526dc367..72ffd5f3be 100644
--- a/actionview/test/template/text_test.rb
+++ b/actionview/test/template/text_test.rb
@@ -4,4 +4,20 @@ class TextTest < ActiveSupport::TestCase
test "formats always return :text" do
assert_equal [:text], ActionView::Template::Text.new("").formats
end
+
+ test "identifier should return 'text template'" do
+ assert_equal "text template", ActionView::Template::Text.new("").identifier
+ end
+
+ test "inspect should return 'text template'" do
+ assert_equal "text template", ActionView::Template::Text.new("").inspect
+ end
+
+ test "to_str should return a given string" do
+ assert_equal "a cat", ActionView::Template::Text.new("a cat").to_str
+ end
+
+ test "render should return a given string" do
+ assert_equal "a dog", ActionView::Template::Text.new("a dog").render
+ end
end