File: ae.rb

package info (click to toggle)
ruby-ae 1.8.2-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, forky, sid, trixie
  • size: 208 kB
  • sloc: ruby: 936; makefile: 2
file content (29 lines) | stat: -rw-r--r-- 678 bytes parent folder | download | duplicates (2)
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