Sha256: 8c8e4fd162abbb453d1bd0ffa5f214a8885b7bd6f37c0336e53d0ba75d938ff8

Contents?: true

Size: 519 Bytes

Versions: 19

Compression:

Stored size: 519 Bytes

Contents

require 'rspec'
module Finitio
  describe System, "[]" do

    let(:system){ System.new }

    before do
      system.add_type(intType)
    end

    subject{ system[name] }

    context 'with an existing type name' do
      let(:name){ "intType" }

      it 'should return the type' do
        expect(subject).to eq(intType)
      end
    end

    context 'with a non existing type name' do
      let(:name){ "noSuchOne" }

      it 'should return nil' do
        expect(subject).to be_nil
      end
    end

  end
end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
finitio-0.12.0 spec/system/test_get_type.rb
finitio-0.11.4 spec/system/test_get_type.rb
finitio-0.11.3 spec/system/test_get_type.rb
finitio-0.11.2 spec/system/test_get_type.rb
finitio-0.11.1 spec/system/test_get_type.rb
finitio-0.10.0 spec/system/test_get_type.rb
finitio-0.9.1 spec/system/test_get_type.rb
finitio-0.9.0 spec/system/test_get_type.rb
finitio-0.8.0 spec/system/test_get_type.rb
finitio-0.7.0 spec/system/test_get_type.rb
finitio-0.7.0.pre.rc4 spec/system/test_get_type.rb
finitio-0.7.0.pre.rc3 spec/system/test_get_type.rb
finitio-0.7.0.pre.rc2 spec/system/test_get_type.rb
finitio-0.7.0.pre.rc1 spec/system/test_get_type.rb
finitio-0.6.1 spec/system/test_get_type.rb
finitio-0.6.0 spec/system/test_get_type.rb
finitio-0.5.2 spec/system/test_get_type.rb
finitio-0.5.1 spec/system/test_get_type.rb
finitio-0.5.0 spec/system/test_get_type.rb