Sha256: 075d5b9168dd23429c105d8d66ae58f75660bdaef3c243ec73639d6342e54c78

Contents?: true

Size: 387 Bytes

Versions: 1

Compression:

Stored size: 387 Bytes

Contents

module Xpect
  class EqualityHelpers
    def self.equal?(val_1, val_2, path)
      unless val_1 == val_2
        raise FailedSpec, "'#{ val_1 }' is not equal to '#{ val_2 }' at '#{ path }'"
      end
    end

    def self.equal_with_proc?(fn, val, path)
      unless fn.call(val)
        raise FailedSpec, "'#{ val }' does not meet expectation at '#{ path }'"
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
xpect-0.1.0 lib/xpect/equality_helpers.rb