Sha256: 1b167d0ddaf6738f6f473d93d6b241d9539700eb26e66b2a304b717b5d51d9d6

Contents?: true

Size: 606 Bytes

Versions: 1

Compression:

Stored size: 606 Bytes

Contents

require_relative 'be_instance_of'

# Namespace for the Matchi library.
module Matchi
  # **Type/class** matcher.
  class BeAnInstanceOf < BeInstanceOf
    # Returns a string representing the matcher.
    #
    # @return [String] A string representing the matcher.
    def to_s
      "be_an_instance_of #{@expected.inspect}"
    end

    # Returns a hash of one key-value pair with a key corresponding to the
    #   matcher and a value corresponding to its initialize parameters.
    #
    # @return [Hash] A hash of one key-value pair.
    def to_h
      { BeAnInstanceOf: [@expected] }
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
matchi-rspec-0.0.3 lib/matchi/rspec/be_an_instance_of.rb