1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

erb/new_spec.rb: fix spec failure by other specs

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65684 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
k0kubun 2018-11-12 07:58:29 +00:00
parent 8ad336b5c5
commit 5a10e835ae

View file

@ -38,9 +38,14 @@ END
ruby_version_is "2.6" do
it "warns invalid trim_mode" do
lambda do
ERBSpecs.new_erb(@eruby_str, trim_mode: '')
end.should output(nil, /Invalid ERB trim mode/)
begin
$VERBOSE, verbose = false, $VERBOSE # Some other specs make $VERBOSE `nil`.
lambda do
ERBSpecs.new_erb(@eruby_str, trim_mode: '')
end.should output(nil, /Invalid ERB trim mode/)
ensure
$VERBOSE = verbose
end
end
end