diff options
author | kenta-s <knt01222@gmail.com> | 2017-01-20 07:08:23 +0900 |
---|---|---|
committer | kenta-s <knt01222@gmail.com> | 2017-01-20 07:08:24 +0900 |
commit | a35aeaaa63332d6976a372e9e225adf086844ff1 (patch) | |
tree | 6d17eb8b3021b2d08ee95dfe7221afcf356d8165 | |
parent | dbeed41e5d11ed661dd2ee065c8fcdb76a555838 (diff) | |
download | rails-a35aeaaa63332d6976a372e9e225adf086844ff1.tar.gz rails-a35aeaaa63332d6976a372e9e225adf086844ff1.tar.bz2 rails-a35aeaaa63332d6976a372e9e225adf086844ff1.zip |
Add missing tests for ActionView::Template::Text
-rw-r--r-- | actionview/test/template/text_test.rb | 16 |
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 |