File tree Expand file tree Collapse file tree 2 files changed +18
-2
lines changed Expand file tree Collapse file tree 2 files changed +18
-2
lines changed Original file line number Diff line number Diff line change 11#!/usr/bin/env ruby
22
3+ $VERBOSE = true
4+
35$LOAD_PATH. unshift ( "test" )
46$LOAD_PATH. unshift ( "test/lib" )
57$LOAD_PATH. unshift ( "lib" )
Original file line number Diff line number Diff line change @@ -222,13 +222,27 @@ def test_with_default_internal
222222 end
223223 end
224224
225+ def with_verbose ( verbose )
226+ original = $VERBOSE
227+ begin
228+ $VERBOSE = verbose
229+ yield
230+ ensure
231+ $VERBOSE = original
232+ end
233+ end
234+
225235 def with_default_internal ( encoding )
226236 original = Encoding . default_internal
227237 begin
228- Encoding . default_internal = encoding
238+ with_verbose ( false ) do
239+ Encoding . default_internal = encoding
240+ end
229241 yield
230242 ensure
231- Encoding . default_internal = original
243+ with_verbose ( false ) do
244+ Encoding . default_internal = original
245+ end
232246 end
233247 end
234248end
You can’t perform that action at this time.
0 commit comments