Sha256: 2515d79c42296f6593a06a27c326e8891ed798049c9a91d8527b03bd3232d6e7
Contents?: true
Size: 925 Bytes
Versions: 3
Compression:
Stored size: 925 Bytes
Contents
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper') describe SPNet::Network do context '.new' do before :all do @sample_rate = 1.0 end context 'no blocks, or links given' do before :all do @network = Network.new :sample_rate => @sample_rate end it 'should have no blocks' do @network.blocks.should be_empty end it 'should have no links' do @network.links.should be_empty end end it 'should activate links' do a = TestBlock.new(:sample_rate => @sample_rate) b = TestBlock.new(:sample_rate => @sample_rate) link = Link.new(:from => a.out_ports["OUT"], :to => b.in_ports["IN"]) network = Network.new( :sample_rate => @sample_rate, :blocks => { "A" => a, "B" => b }, :links => [ link ], ) link.active?.should be_true end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
spnet-0.1.8 | spec/core/network_spec.rb |
spnet-0.1.7 | spec/core/network_spec.rb |
spnet-0.1.6 | spec/core/network_spec.rb |