Permalink
Browse files

Allow for constants to include "Omission" or :Omission (1.8 vs. 1.9).

Fixes #51.
  • Loading branch information...
1 parent b22ba4b commit a6d1d8d1c74ec00fe652643611bde9d613762c61 @nicksieger nicksieger committed Feb 16, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/ci/reporter/test_unit.rb
@@ -13,8 +13,8 @@ module Reporter
class Failure
def self.new(fault)
return TestUnitFailure.new(fault) if fault.kind_of?(Test::Unit::Failure)
- return TestUnitSkipped.new(fault) if Test::Unit.constants.include?("Omission") && (fault.kind_of?(Test::Unit::Omission) || fault.kind_of?(Test::Unit::Pending))
- return TestUnitNotification.new(fault) if Test::Unit.constants.include?("Notification") && fault.kind_of?(Test::Unit::Notification)
+ return TestUnitSkipped.new(fault) if !(Test::Unit.constants & [:Omission, "Omission"]).empty? && (fault.kind_of?(Test::Unit::Omission) || fault.kind_of?(Test::Unit::Pending))
+ return TestUnitNotification.new(fault) if !(Test::Unit.constants & [:Notification, "Notification"]).empty? && fault.kind_of?(Test::Unit::Notification)
TestUnitError.new(fault)
end
end

0 comments on commit a6d1d8d

Please sign in to comment.