[macruby-changes] [4744] DietRB/trunk/spec/formatter_spec.rb

source_changes at macosforge.org source_changes at macosforge.org
Fri Oct 8 04:08:42 PDT 2010


Revision: 4744
          http://trac.macosforge.org/projects/ruby/changeset/4744
Author:   eloy.de.enige at gmail.com
Date:     2010-10-08 04:08:40 -0700 (Fri, 08 Oct 2010)
Log Message:
-----------
Get rid of last noise when running the specs

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

Modified Paths:
--------------
    DietRB/trunk/spec/formatter_spec.rb

Modified: DietRB/trunk/spec/formatter_spec.rb
===================================================================
--- DietRB/trunk/spec/formatter_spec.rb	2010-10-08 11:08:33 UTC (rev 4743)
+++ DietRB/trunk/spec/formatter_spec.rb	2010-10-08 11:08:40 UTC (rev 4744)
@@ -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
   
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-changes/attachments/20101008/6dd956b0/attachment.html>


More information about the macruby-changes mailing list