ci-reporter / ci_reporter

CI::Reporter is an add-on to popular test frameworks that allows you to generate XML reports
MIT License
343 stars 110 forks source link

do not search ancestors when checking Test::Unit.const_defined? #73

Closed seanwalbran closed 12 years ago

seanwalbran commented 12 years ago

Fix a false-positive detection of Test::Unit::Notification being defined due to const_defined? searching up the object heirarchy by default, which results in an uninitialized-constant-name-error at runtime if e.g. :Notification is defined elsewhere.

[1] pry(main)> Test::Unit.const_defined?(:Notification) => true [2] pry(main)> Test::Unit.const_defined?(:Notification, false) => false [5] pry(main)> Object.const_defined?(:Notification, false) => true

(Introduced in this commit: https://github.com/nicksieger/ci_reporter/commit/e7a0ff810a9cf21678ad6704b41fc3ad093d38ff )

nicksieger commented 12 years ago

Thanks Sean! (sigh on the const_defined? collision).

seanwalbran commented 12 years ago

Thanks for the quick merge, much appreciated!