Sha256: a340cce1f66f40cbac0e54fc742987ada6cd848a3b4db93bac70149444d10a3d
Contents?: true
Size: 563 Bytes
Versions: 4
Compression:
Stored size: 563 Bytes
Contents
require 'spec_helper' module Alf describe Tuple, 'hash' do let(:tuple){ Tuple[id: Integer].new(id: 12) } subject{ tuple.hash == other.hash } context 'on purely equal tuple' do let(:other){ Tuple[id: Integer].new(id: 12) } it{ should be_true } end context 'on equal tuple but a subtype' do let(:other){ Tuple[id: Fixnum].new(id: 12) } it{ should be_true } end context 'on equal tuple but a supertype' do let(:other){ Tuple[id: Numeric].new(id: 12) } it{ should be_true } end end end
Version data entries
4 entries across 4 versions & 1 rubygems