diff options
author | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-08-14 06:52:41 +0000 |
---|---|---|
committer | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-08-14 06:52:41 +0000 |
commit | b3a4461df2c78b4828cf344789b80e3c3ebedd14 (patch) | |
tree | 6d1016d68392f7efa9f1bb98794e4a3e7fe879b8 /test/erb | |
parent | 9933a6019f8e867a546723e983e0a50593d35cbd (diff) |
Suppress warnings.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36694 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/erb')
-rw-r--r-- | test/erb/test_erb.rb | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/test/erb/test_erb.rb b/test/erb/test_erb.rb index e609d47876..e3bc54a61f 100644 --- a/test/erb/test_erb.rb +++ b/test/erb/test_erb.rb @@ -59,7 +59,13 @@ class TestERBCore < Test::Unit::TestCase _test_core(0) _test_core(1) _test_core(2) - _test_core(3) + orig = $VERBOSE + begin + $VERBOSE = false + _test_core(3) + ensure + $VERBOSE = orig + end end def _test_core(safe) @@ -192,26 +198,26 @@ EOS %n = 1 <%= n%> EOS - assert_equal("1\n", ERB.new(src, nil, '%').result) + assert_equal("1\n", ERB.new(src, nil, '%').result(binding)) src = <<EOS <% %> EOS ans = "\n" - assert_equal(ans, ERB.new(src, nil, '%').result) + assert_equal(ans, ERB.new(src, nil, '%').result(binding)) src = "<%\n%>" # ans = "\n" ans = "" - assert_equal(ans, ERB.new(src, nil, '%').result) + assert_equal(ans, ERB.new(src, nil, '%').result(binding)) src = <<EOS <% n = 1 %><%= n%> EOS - assert_equal("1\n", ERB.new(src, nil, '%').result) + assert_equal("1\n", ERB.new(src, nil, '%').result(binding)) src = <<EOS %n = 1 @@ -227,7 +233,7 @@ EOS % %%><%1 %% EOS - assert_equal(ans, ERB.new(src, nil, '%').result) + assert_equal(ans, ERB.new(src, nil, '%').result(binding)) end def test_def_erb_method |