1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
|
module AE
# TODO: Should we really be reseting a constant for ::Assertion?
# How about using a variable instead?
# Set Assertion class. This is a convenience method
# for framework adapters, used to set the exception class
# that a framework uses to raise an assertion error.
#
# @param [Class] exception_class
# The Exception subclass used to raise assertions.
#
def self.assertion_error=(exception_class)
verbose, $VERBOSE = $VERBOSE, nil
Object.const_set(:Assertion, exception_class)
$VERBOSE = verbose
end
end
require 'ae/version'
require 'ae/assert'
require 'ae/expect'
class ::Object
include AE::Assert
include AE::Expect
end
|