diff options
author | k0kubun <k0kubun@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-11-12 07:58:29 +0000 |
---|---|---|
committer | k0kubun <k0kubun@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-11-12 07:58:29 +0000 |
commit | 5a10e835ae67daa8e75d23a1b221ce4dc486bc1a (patch) | |
tree | a897a44a682099cbaaa852deb46891eede43510d /spec/ruby | |
parent | 8ad336b5c5e4f888d860164c914147d656ffe0f2 (diff) | |
download | ruby-5a10e835ae67daa8e75d23a1b221ce4dc486bc1a.tar.gz |
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
Diffstat (limited to 'spec/ruby')
-rw-r--r-- | spec/ruby/library/erb/new_spec.rb | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/spec/ruby/library/erb/new_spec.rb b/spec/ruby/library/erb/new_spec.rb index 33a3952dd4..3f6ae93f9f 100644 --- a/spec/ruby/library/erb/new_spec.rb +++ b/spec/ruby/library/erb/new_spec.rb @@ -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 |