Sha256: 10aaf3be779790e53ee780528298e335bac294b97ed6cdc85576968b1bc6a6bd
Contents?: true
Size: 548 Bytes
Versions: 2
Compression:
Stored size: 548 Bytes
Contents
require 'spec_helper' module Finitio describe System, "initialize" do let(:system){ System.new } context 'for building a tuple type' do subject{ system.tuple(r: Integer) } it{ should be_a(TupleType) } end context 'for building a sub type' do subject{ system.subtype(Integer){|i| i>=0 } } it{ should be_a(SubType) } it 'should apply the constraint' do ->{ subject.dress(-9) }.should raise_error(TypeError) end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
finitio-0.4.1 | spec/unit/system/test_dsl.rb |
finitio-0.4.0 | spec/unit/system/test_dsl.rb |