Sha256: 6c9a01a2c436cb9edd509c4bca573f274dc92505eb67f871ab28f51f6e425e82

Contents?: true

Size: 724 Bytes

Versions: 5

Compression:

Stored size: 724 Bytes

Contents

# frozen_string_literal: true

require_relative "shared"
require_relative File.join("..", "expectation_target", "block")

module RSpec
  module Clone
    module ExpectationHelper
      # {RSpec::Clone::Dsl.its}'s expectation helper module.
      module Its
        include Shared

        # Wraps the target of an expectation with the actual value.
        #
        # @return [Block] The wrapped target of an expectation.
        #
        # @example
        #   is_expected # => #<RSpec::ExpectationTarget::Block:0x00007fb6b8263df8 @callable=#<Proc:0x00007fb6b8263e20>>
        #
        # @api public
        def is_expected
          ExpectationTarget::Block.new(method(:actual))
        end
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
r_spec-clone-1.2.1 lib/r_spec/clone/expectation_helper/its.rb
r_spec-clone-1.2.0 lib/r_spec/clone/expectation_helper/its.rb
r_spec-clone-1.1.0 lib/r_spec/clone/expectation_helper/its.rb
r_spec-clone-1.0.2 lib/r_spec/clone/expectation_helper/its.rb
r_spec-clone-1.0.0.rc1 lib/r_spec/clone/expectation_helper/its.rb