Class: Lookout::Actual::Not

Inherits:
Lookout::Actual show all
Defined in:
lib/lookout-3.0/actual/not.rb

Overview

Inverts Lookout::Actual. Allows a query method to call on the actual result to be set up and its inversion checked after the expect block returns.

Defined Under Namespace

Classes: Method

Constant Summary

Constants inherited from Lookout::Aphonic

Lookout::Aphonic::Methods

Instance Method Summary collapse

Methods inherited from Lookout::Actual

#be, #have, #to

Methods inherited from Lookout::Aphonic

silence

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(method, *args, &block) ⇒ Method (private)

Returns A method wrapper that’ll call METHOD with ARGS and BLOCK when called.

Returns:

  • (Method)

    A method wrapper that’ll call METHOD with ARGS and BLOCK when called



12
# File 'lib/lookout-3.0/actual/not.rb', line 12

def method_missing(method, *args, &block); Method.new(method, *args, &block) end

Instance Method Details

#notActual

Returns A result stand-in that’s the inversion of the receiver.

Returns:

  • (Actual)

    A result stand-in that’s the inversion of the receiver



7
# File 'lib/lookout-3.0/actual/not.rb', line 7

def not; Lookout::Actual.new end