Sha256: fa1c3a6cdea376218077c53da174b18adbb85d792f2f7ccd8b1775bba95c2f6e

Contents?: true

Size: 587 Bytes

Versions: 19

Compression:

Stored size: 587 Bytes

Contents

require 'rspec'
module Finitio
  describe System, "dup" do

    let(:system){ System.new }

    before do
      system.add_type(intType)
    end

    subject{ system.dup }

    it{ should be_a(System) }

    it 'should not be the same object' do
      expect(subject).not_to be(system)
    end

    it 'should have intType' do
      expect(subject['intType']).to eq(intType)
    end

    it 'should not share internals with the original' do
      subject.add_type(floatType)
      expect(subject['floatType']).not_to be_nil
      expect(system['floatType']).to be_nil
    end

  end
end

Version data entries

19 entries across 19 versions & 1 rubygems

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