Sha256: d7f799e798f788a582fe5ba63c47af4203f8cf3181b9907d1e920eba4e4da709
Contents?: true
Size: 465 Bytes
Versions: 3
Compression:
Stored size: 465 Bytes
Contents
require 'spec_helper' module Qrb 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
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
qrb-0.3.0 | spec/unit/type/union_type/test_include.rb |
qrb-0.2.0 | spec/unit/type/union_type/test_include.rb |
qrb-0.1.0 | spec/unit/type/union_type/test_include.rb |