Sha256: 23b6b36fb903f1ea19d1fbc461007f980f96c6ae983e72aa2026d3cedecdc877
Contents?: true
Size: 561 Bytes
Versions: 19
Compression:
Stored size: 561 Bytes
Contents
require 'spec_helper' module Finitio describe UnionType, "initialize" do context 'with valid candidates' do let(:union){ UnionType.new([intType, floatType]) } it 'sets the variable instances' do expect(union.candidates).to eq([intType, floatType]) end end context 'with invalid candidates' do let(:union){ UnionType.new(["bar"]) } it 'should raise an error' do expect{ union }.to raise_error(ArgumentError, %Q{[Finitio::Type] expected, got ["bar"]}) end end end end
Version data entries
19 entries across 19 versions & 1 rubygems