Sha256: 215fdae69ddd664cda371df65a308ce61c059b7525051eb2b14f05ac813617fe

Contents?: true

Size: 524 Bytes

Versions: 2

Compression:

Stored size: 524 Bytes

Contents

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

Version data entries

2 entries across 2 versions & 1 rubygems

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