Sha256: 1fac3a32ff0352c4df6cb34b505c7fd1fa14ada966e4a0b6483833539cb4c2ed

Contents?: true

Size: 811 Bytes

Versions: 4

Compression:

Stored size: 811 Bytes

Contents

require 'fix'

# Namespace for the Fix framework.
#
module Fix
  # Wraps the target of an expectation.
  #
  class It
    # Create a new expection target given an object.
    #
    # @param object [#object_id] An object to test.
    #
    # @return [Expect] An expect instance.
    def expect(object)
      Expect.new(object, *challenges)
    end

    # Create a new expection target given a block.
    #
    # @param block [Proc] A code to test.
    #
    # @return [Expect] An expect instance.
    def expect_block(&block)
      Expect.new(block, *([block_challenge] + challenges))
    end

    # rubocop:disable PredicateName

    # Create a new expection target given the subject.
    #
    # @return [Expect] An expect instance.
    def is_expected
      Expect.new(subject, *challenges)
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
fix-expect-0.3.2 lib/fix/it.rb
fix-expect-0.3.1 lib/fix/it.rb
fix-expect-0.3.0 lib/fix/it.rb
fix-expect-0.2.0 lib/fix/it.rb