Module: Expect

Defined in:
lib/expect.rb,
lib/expect/matcher.rb,
lib/expect/exception/failure.rb,
lib/expect/expectation_target.rb

Overview

Namespace for the Expect library.

Examples:

Expect 42 to be equal to 42

Expect.this { 42 }.to equal: 42 # => true

Defined Under Namespace

Modules: Matcher Classes: ExpectationTarget, Failure

Class Method Summary collapse

Class Method Details

.this(&input) ⇒ ExpectationTarget

Expectations are built with this method.

Examples:

Identity expectation

this { 42 }.to equal: 42 # => true

Returns:



18
19
20
# File 'lib/expect.rb', line 18

def self.this(&input)
  ExpectationTarget.new(&input)
end