Module: RSpec::Clone::ExpectationHelper::Its Private

Includes:
Shared
Defined in:
lib/r_spec/clone/expectation_helper/its.rb

Overview

This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.

Dsl.its‘s expectation helper module.

Instance Method Summary collapse

Methods included from Shared

#be, #be_an_instance_of, #be_false, #be_nil, #be_true, #be_within, #change, #eq, #match, #raise_exception, #satisfy

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class RSpec::Clone::ExpectationHelper::Shared

Instance Method Details

#is_expectedBlock

Wraps the target of an expectation with the actual value.

Examples:

is_expected # => #<RSpec::Clone::ExpectationTarget::Block:0x00007f @callable=#<Proc:0x00007f>>

Returns:

  • (Block)

    The wrapped target of an expectation.



21
22
23
# File 'lib/r_spec/clone/expectation_helper/its.rb', line 21

def is_expected
  ExpectationTarget::Block.new(method(:actual))
end