Skip to content
Browse files

Get rid of last noise when running the specs

From: Eloy Duran <eloy.de.enige@gmail.com>

git-svn-id: http://svn.macosforge.org/repository/ruby/DietRB/trunk@4744 23306eb0-4c56-4727-a40e-e92c0eb68959
  • Loading branch information...
1 parent 0354f83 commit 8837e7bc2779ac3f80e147fb54e9baf3710b172c @alloy alloy committed Oct 8, 2010
Showing with 4 additions and 2 deletions.
  1. +4 −2 spec/formatter_spec.rb
View
6 spec/formatter_spec.rb
@@ -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 8837e7b

Please sign in to comment.
Something went wrong with that request. Please try again.