Sha256: 6885231981bb5a3138be3a0030e3d00c9b99ba86c2c99f4542caf3cbb757e1e8

Contents?: true

Size: 685 Bytes

Versions: 15

Compression:

Stored size: 685 Bytes

Contents

require 'spec_helper'
describe Finitio, "system" do

  context 'with a string' do
    subject{
      Finitio.system <<-EOF
        Posint = .Fixnum( i | i>=0 )
        Point  = { x: Posint, y: Posint }
      EOF
    }

    it{ should be_a(Finitio::System) }

    it 'should have the expected types' do
      expect(subject["Posint"]).to be_a(Finitio::SubType)
      expect(subject["Point"]).to be_a(Finitio::TupleType)
    end
  end

  context 'with a Path' do
    subject{
      Finitio.system(Path.dir/"system.fio")
    }

    it{ should be_a(Finitio::System) }

    it 'should have the expected types' do
      expect(subject["Posint"]).to be_a(Finitio::SubType)
    end
  end

end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
finitio-0.11.4 spec/finitio/test_system.rb
finitio-0.11.3 spec/finitio/test_system.rb
finitio-0.11.2 spec/finitio/test_system.rb
finitio-0.11.1 spec/finitio/test_system.rb
finitio-0.10.0 spec/finitio/test_system.rb
finitio-0.9.1 spec/finitio/test_system.rb
finitio-0.9.0 spec/finitio/test_system.rb
finitio-0.8.0 spec/finitio/test_system.rb
finitio-0.7.0 spec/finitio/test_system.rb
finitio-0.7.0.pre.rc1 spec/finitio/test_system.rb
finitio-0.6.1 spec/finitio/test_system.rb
finitio-0.6.0 spec/finitio/test_system.rb
finitio-0.5.2 spec/finitio/test_system.rb
finitio-0.5.1 spec/finitio/test_system.rb
finitio-0.5.0 spec/finitio/test_system.rb