Sha256: dd2204bac6c967ea2574f7799c800f41cf3a5b579071181a45f3b3ab67c4e69a

Contents?: true

Size: 711 Bytes

Versions: 10

Compression:

Stored size: 711 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::Clone::ExpectationTarget::Block:0x00007f @callable=#<Proc:0x00007f>>
        #
        # @api public
        def is_expected
          ExpectationTarget::Block.new(method(:actual))
        end
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
r_spec-clone-1.7.2 lib/r_spec/clone/expectation_helper/its.rb
r_spec-clone-1.7.1 lib/r_spec/clone/expectation_helper/its.rb
r_spec-clone-1.7.0 lib/r_spec/clone/expectation_helper/its.rb
r_spec-clone-1.6.0 lib/r_spec/clone/expectation_helper/its.rb
r_spec-clone-1.5.0 lib/r_spec/clone/expectation_helper/its.rb
r_spec-clone-1.4.0 lib/r_spec/clone/expectation_helper/its.rb
r_spec-clone-1.3.0 lib/r_spec/clone/expectation_helper/its.rb
r_spec-clone-1.2.4 lib/r_spec/clone/expectation_helper/its.rb
r_spec-clone-1.2.3 lib/r_spec/clone/expectation_helper/its.rb
r_spec-clone-1.2.2 lib/r_spec/clone/expectation_helper/its.rb