|
4 | 4 |
|
5 | 5 | class TestErbCommand < Test::Unit::TestCase
|
6 | 6 | 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", |
9 | 8 | File.expand_path("../../libexec/erb", __dir__),
|
10 | 9 | "var=hoge"],
|
11 | 10 | "<%=var%>", ["hoge"])
|
12 | 11 | end
|
13 | 12 |
|
14 | 13 | 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", |
17 | 15 | File.expand_path("../../libexec/erb", __dir__)],
|
18 | 16 | "<%=''.encoding.to_s%>", ["UTF-8"])
|
19 | 17 | end
|
20 | 18 |
|
21 | 19 | # These interfaces will be removed at Ruby 2.7.
|
22 | 20 | 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') |
24 | 21 | warnings = [
|
25 | 22 | "warning: -S option of erb command is deprecated. Please do not use this.",
|
26 | 23 | /\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/,
|
27 | 24 | ]
|
28 |
| - assert_in_out_err(["-w", |
| 25 | + assert_in_out_err(["-I#{File.expand_path('../../lib', __dir__)}", "-w", |
29 | 26 | File.expand_path("../../libexec/erb", __dir__),
|
30 | 27 | "-S", "0"],
|
31 | 28 | "hoge", ["hoge"], warnings)
|
|
0 commit comments