Skip to content

Commit 012faba

Browse files
committed
Make sure erb.rb in this repository is tested
1 parent cb59f11 commit 012faba

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

test/erb/test_erb_command.rb

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,28 +4,25 @@
44

55
class TestErbCommand < Test::Unit::TestCase
66
def test_var
7-
pend 'this test has not supported Ruby 2.5' if Gem::Version.new(RUBY_VERSION) < Gem::Version.new('2.6.0')
8-
assert_in_out_err(["-w",
7+
assert_in_out_err(["-I#{File.expand_path('../../lib', __dir__)}", "-w",
98
File.expand_path("../../libexec/erb", __dir__),
109
"var=hoge"],
1110
"<%=var%>", ["hoge"])
1211
end
1312

1413
def test_template_file_encoding
15-
pend 'this test has not supported Ruby 2.5' if Gem::Version.new(RUBY_VERSION) < Gem::Version.new('2.6.0')
16-
assert_in_out_err(["-w",
14+
assert_in_out_err(["-I#{File.expand_path('../../lib', __dir__)}", "-w",
1715
File.expand_path("../../libexec/erb", __dir__)],
1816
"<%=''.encoding.to_s%>", ["UTF-8"])
1917
end
2018

2119
# These interfaces will be removed at Ruby 2.7.
2220
def test_deprecated_option
23-
pend 'this test has not supported Ruby 2.5' if Gem::Version.new(RUBY_VERSION) < Gem::Version.new('2.6.0')
2421
warnings = [
2522
"warning: -S option of erb command is deprecated. Please do not use this.",
2623
/\n.+\/libexec\/erb:\d+: warning: Passing safe_level with the 2nd argument of ERB\.new is deprecated\. Do not use it, and specify other arguments as keyword arguments\.\n/,
2724
]
28-
assert_in_out_err(["-w",
25+
assert_in_out_err(["-I#{File.expand_path('../../lib', __dir__)}", "-w",
2926
File.expand_path("../../libexec/erb", __dir__),
3027
"-S", "0"],
3128
"hoge", ["hoge"], warnings)

0 commit comments

Comments
 (0)