Sha256: ebd92753a3852a0cdd9d67bf089db464078cc58458bc25c1763bb47af4a1f02a
Contents?: true
Size: 623 Bytes
Versions: 19
Compression:
Stored size: 623 Bytes
Contents
require 'spec_helper' module Finitio describe SetType, "equality" do let(:type) { SetType.new(intType) } let(:type2){ SetType.new(intType) } let(:type3){ SetType.new(floatType) } it 'should apply structural equality' do expect(type == type2).to eq(true) end it 'should apply distinguish different types' do expect(type == type3).to eq(false) end it 'should be a total function, with false for non types' do expect(type == 12).to eq(false) end it 'should implement hash accordingly' do expect(type.hash == type2.hash).to eq(true) end end end
Version data entries
19 entries across 19 versions & 1 rubygems