module Expect

Namespace for the Expect library.

@api public

@example Expect 42 to be equal to 42

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

Public Class Methods

this(&input) click to toggle source

Expectations are built with this method.

@example Identity expectation

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

@param input [Proc] the code to test.

@return [ExpectationTarget] the expectation target.

# File lib/expect.rb, line 18
def self.this(&input)
  ExpectationTarget.new(&input)
end