aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/template/erb/tag_helper_test.rb
diff options
context:
space:
mode:
authorPiotr Sarnacki <drogus@gmail.com>2013-04-17 00:06:11 +0200
committerŁukasz Strzałkowski <lukasz.strzalkowski@gmail.com>2013-06-20 17:23:16 +0200
commiteb23754ebbfbf2d465cc0f900720704fb3703633 (patch)
tree5bd1764233b59075341611b1e857d418c794d812 /actionpack/test/template/erb/tag_helper_test.rb
parent5bcdf4faa6da7acb762dab680372f8520a0533c2 (diff)
downloadrails-eb23754ebbfbf2d465cc0f900720704fb3703633.tar.gz
rails-eb23754ebbfbf2d465cc0f900720704fb3703633.tar.bz2
rails-eb23754ebbfbf2d465cc0f900720704fb3703633.zip
Move template tests from actionpack to actionview
Diffstat (limited to 'actionpack/test/template/erb/tag_helper_test.rb')
-rw-r--r--actionpack/test/template/erb/tag_helper_test.rb30
1 files changed, 0 insertions, 30 deletions
diff --git a/actionpack/test/template/erb/tag_helper_test.rb b/actionpack/test/template/erb/tag_helper_test.rb
deleted file mode 100644
index 84e328d8be..0000000000
--- a/actionpack/test/template/erb/tag_helper_test.rb
+++ /dev/null
@@ -1,30 +0,0 @@
-require "abstract_unit"
-require "template/erb/helper"
-
-module ERBTest
- class TagHelperTest < BlockTestCase
- test "percent equals works for content_tag and does not require parenthesis on method call" do
- assert_equal "<div>Hello world</div>", render_content("content_tag :div", "Hello world")
- end
-
- test "percent equals works for javascript_tag" do
- expected_output = "<script>\n//<![CDATA[\nalert('Hello')\n//]]>\n</script>"
- assert_equal expected_output, render_content("javascript_tag", "alert('Hello')")
- end
-
- test "percent equals works for javascript_tag with options" do
- expected_output = "<script id=\"the_js_tag\">\n//<![CDATA[\nalert('Hello')\n//]]>\n</script>"
- assert_equal expected_output, render_content("javascript_tag(:id => 'the_js_tag')", "alert('Hello')")
- end
-
- test "percent equals works with form tags" do
- expected_output = %r{<form.*action="foo".*method="post">.*hello*</form>}
- assert_match expected_output, render_content("form_tag('foo')", "<%= 'hello' %>")
- end
-
- test "percent equals works with fieldset tags" do
- expected_output = "<fieldset><legend>foo</legend>hello</fieldset>"
- assert_equal expected_output, render_content("field_set_tag('foo')", "<%= 'hello' %>")
- end
- end
-end