Skip to content

Commit ec4d450

Browse files
committed
Fix $VERBOSE specs to restore the value of $VERBOSE
1 parent c02ee87 commit ec4d450

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

spec/ruby/language/predefined_spec.rb

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -933,6 +933,14 @@ def obj.foo2; yield; end
933933
end
934934

935935
describe "Global variable $VERBOSE" do
936+
before :each do
937+
@verbose = $VERBOSE
938+
end
939+
940+
after :each do
941+
$VERBOSE = @verbose
942+
end
943+
936944
it "converts truthy values to true" do
937945
[true, 1, 0, [], ""].each do |true_value|
938946
$VERBOSE = true_value

0 commit comments

Comments
 (0)