Capture problems #16

Closed
dcorbin opened this Issue Nov 8, 2010 · 2 comments

Comments

Projects
None yet
1 participant

dcorbin commented Nov 8, 2010

Version 1.6.3:

I have a unit-test that is failing only with ci_reporter, because $stdout is changing "mid-stream", and the test is expecting it to be the same value throughout the life of the test.

Digging through the code, I found out I could turn off capture with CI_CAPTURE=off, however disable capture generates an exception:

/home/dcorbin/.gem/ruby/1.8/gems/builder-2.1.2/lib/builder/xmlbase.rb:115:in _escape': undefined methodto_xs' for nil:NilClass (NoMethodError)
from /home/dcorbin/.gem/ruby/1.8/gems/builder-2.1.2/lib/builder/xmlbase.rb:81:in text!' from /home/dcorbin/.gem/ruby/1.8/gems/ci_reporter-1.6.3/lib/ci/reporter/test_suite.rb:89 from /home/dcorbin/.gem/ruby/1.8/gems/builder-2.1.2/lib/builder/xmlbase.rb:134:incall'
from /home/dcorbin/.gem/ruby/1.8/gems/builder-2.1.2/lib/builder/xmlbase.rb:134:in _nested_structures' from /home/dcorbin/.gem/ruby/1.8/gems/builder-2.1.2/lib/builder/xmlbase.rb:58:inmethod_missing'
from /home/dcorbin/.gem/ruby/1.8/gems/builder-2.1.2/lib/builder/xmlbase.rb:31:in tag!' from /home/dcorbin/.gem/ruby/1.8/gems/ci_reporter-1.6.3/lib/ci/reporter/test_suite.rb:88 from /home/dcorbin/.gem/ruby/1.8/gems/builder-2.1.2/lib/builder/xmlbase.rb:134:incall'
from /home/dcorbin/.gem/ruby/1.8/gems/builder-2.1.2/lib/builder/xmlbase.rb:134:in _nested_structures' from /home/dcorbin/.gem/ruby/1.8/gems/builder-2.1.2/lib/builder/xmlbase.rb:58:inmethod_missing'
from /home/dcorbin/.gem/ruby/1.8/gems/ci_reporter-1.6.3/lib/ci/reporter/test_suite.rb:84:in to_xml' from /home/dcorbin/.gem/ruby/1.8/gems/ci_reporter-1.6.3/lib/ci/reporter/report_manager.rb:18:inwrite_report'
from /home/dcorbin/.gem/ruby/1.8/gems/ci_reporter-1.6.3/lib/ci/reporter/report_manager.rb:17:in open' from /home/dcorbin/.gem/ruby/1.8/gems/ci_reporter-1.6.3/lib/ci/reporter/report_manager.rb:17:inwrite_report'
from /home/dcorbin/.gem/ruby/1.8/gems/ci_reporter-1.6.3/lib/ci/reporter/test_unit.rb:114:in finish_suite' from /home/dcorbin/.gem/ruby/1.8/gems/ci_reporter-1.6.3/lib/ci/reporter/test_unit.rb:90:infinished'

dcorbin commented Nov 8, 2010

FYI. I can attribute my test failing to the fact that OutputCapture is using Object#== instead of delegating to the @delegate_io. Adding this (ugly) snippet makes things work better.
----cut-----
def == other
@delegate_io = other.delegate_io
end

attr_reader :delegate_io

dcorbin commented Nov 9, 2010

Does this mean there was a fix applied for future releases?

This issue was closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment