Permalink
Browse files

Get rid of last noise when running the specs

  • Loading branch information...
1 parent 33b499f commit 1c6f48d521e6edf68151413c95b955bed817b393 @alloy committed Jul 24, 2010
Showing with 4 additions and 2 deletions.
  1. +4 −2 spec/formatter_spec.rb
View
@@ -40,13 +40,15 @@
it "does not filter the backtrace if $DEBUG is true" do
begin
- before, $DEBUG = $DEBUG, true
+ stderr, $stderr = $stderr, OutputStub.new
+ debug, $DEBUG = $DEBUG, true
begin; @context.__evaluate__('DoesNotExist'); rescue NameError => e; exception = e; end
@formatter.exception(exception).should ==
"NameError: uninitialized constant IRB::Context::DoesNotExist\n\t#{exception.backtrace.join("\n\t")}"
ensure
- $DEBUG = before
+ $stderr = stderr
+ $DEBUG = debug
end
end

0 comments on commit 1c6f48d

Please sign in to comment.