Sha256: 462247d1c53a1fb1ffb761df56af4d907a681dcf9b7a5b8c35356eb226037753

Contents?: true

Size: 523 Bytes

Versions: 2

Compression:

Stored size: 523 Bytes

Contents

# Namespace for the Matchi library.
module Matchi
  # **Identity** matcher.
  class Be < Equal
    # Returns a string representing the matcher.
    #
    # @return [String] A string representing the matcher.
    def to_s
      "be #{@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
      { Be: [@expected] }
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
matchi-rspec-0.0.3 lib/matchi/rspec/be.rb
matchi-rspec-0.0.2 lib/matchi/rspec/be.rb