Sha256: d29a5fa9cfcfda5e5242eebac3cf7c9af9d1a7787f56c1ac3a6e1bd54974b216

Contents?: true

Size: 622 Bytes

Versions: 3

Compression:

Stored size: 622 Bytes

Contents

module Test #:nodoc:
  module Unit #:nodoc:
    class TestCase #:nodoc:
      alias_method :_run, :run
      def run(result, &block)
        $_result = result
        _run(result, &block)
      end
    end
  end
end

require 'ae'

class Assertion #:nodoc:

  def self.increment(pass)
    @count += 1
    @fails += 1 unless pass

    $_result.add_assertion if $_result
  end

  def self.framework_flunk(options)
    message   = options.delete(:message)
    backtrace = options.delete(:backtrace)

    err = Test::Unit::AssertionFailedError.new(message)
    err.set_backtrace(backtrace) if backtrace
    fail err
  end

end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
ae-1.6.1 lib/ae/adapters/testunit.rb
ae-1.6.0 lib/ae/adapters/testunit.rb
ae-1.5.0 lib/ae/adapters/testunit.rb