Module: AE

Defined in:
lib/ae.rb,
lib/ae/ansi.rb,
lib/ae/must.rb,
lib/ae/check.rb,
lib/ae/assert.rb,
lib/ae/expect.rb,
lib/ae/legacy.rb,
lib/ae/should.rb,
lib/ae/version.rb,
lib/ae/assertor.rb,
lib/ae/assertion.rb,
lib/ae/subjunctive.rb,
lib/ae/basic_object.rb,
lib/ae/basic_object.rb

Defined Under Namespace

Modules: Assert, Check, Expect, Legacy, Must, Should, Subjunctive, World Classes: Assertion, Assertor, BasicObject

Constant Summary collapse

VERSION =

Becuase Ruby 1.8~ gets in the way :(

['version']

Class Method Summary collapse

Class Method Details

.ansi=(boolean) ⇒ Object

To turn of ANSI colorized error messages off, set ansi to false in your test helper.

Examples:

AE.ansi = false


21
22
23
# File 'lib/ae/ansi.rb', line 21

def self.ansi=(boolean)
  @ansi = boolean
end

.ansi?Boolean

ANSI mode.

Returns:

  • (Boolean)

    ANSI mode.



11
12
13
# File 'lib/ae/ansi.rb', line 11

def self.ansi?
  @ansi
end

.assertion_error=(exception_class) ⇒ Object

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.

Parameters:

  • exception_class (Class)

    The Exception subclass used to raise assertions.



13
14
15
16
17
# File 'lib/ae.rb', line 13

def self.assertion_error=(exception_class)
  verbose, $VERBOSE = $VERBOSE, nil
  Object.const_set(:Assertion, exception_class)
  $VERBOSE = verbose
end

.const_missing(name) ⇒ Object



13
14
15
16
# File 'lib/ae/version.rb', line 13

def self.const_missing(name)
  key = name.to_s.downcase
  [key] || super(name)
end

.metadataHash

Access project metadata.

Returns:

  • (Hash)


5
6
7
8
9
10
# File 'lib/ae/version.rb', line 5

def self.
  @metadata ||= (
    require 'yaml'
    YAML.load(File.new(File.dirname(__FILE__) + '/../ae.yml'))
  )
end