Sha256: 3f283ca325f48219e433db3a9f321a2fe847eadb7fbaddd55bdd376875de3750
Contents?: true
Size: 469 Bytes
Versions: 2
Compression:
Stored size: 469 Bytes
Contents
require 'spec_helper' module Finitio describe UnionType, "include?" do let(:type){ UnionType.new([intType, floatType]) } subject{ type.include?(arg) } context 'when not included' do let(:arg){ "12" } it{ should be_false } end context 'when included on int' do let(:arg){ 12 } it{ should be_true } end context 'when included on float' do let(:arg){ 12.0 } it{ should be_true } end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
finitio-0.4.1 | spec/unit/type/union_type/test_include.rb |
finitio-0.4.0 | spec/unit/type/union_type/test_include.rb |