summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authork0kubun <k0kubun@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-11-12 07:58:29 +0000
committerk0kubun <k0kubun@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-11-12 07:58:29 +0000
commit5a10e835ae67daa8e75d23a1b221ce4dc486bc1a (patch)
treea897a44a682099cbaaa852deb46891eede43510d
parent8ad336b5c5e4f888d860164c914147d656ffe0f2 (diff)
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
-rw-r--r--spec/ruby/library/erb/new_spec.rb11
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 33a3952..3f6ae93 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