Sha256: 0a738052f07ed58e04eb08f9468305c75001ae919f50ec61f1e7a7574c0782d1
Contents?: true
Size: 741 Bytes
Versions: 4
Compression:
Stored size: 741 Bytes
Contents
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper') describe SPNet::ParamInPort do before :each do @value = 0 set_value_handler = lambda do |value| return @value = value end get_value_handler = lambda do return @value end @port = SPNet::ParamInPort.new :get_value_handler => get_value_handler, :set_value_handler => set_value_handler end describe '#set_value' do it 'should pass the given value through the set_value handler' do rv = @port.set_value 5 @value.should eq(5) end end describe '#get_value' do it 'should return the value from the get_value handler' do @value = 7 @port.get_value.should eq(7) end end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
spnet-0.1.8 | spec/ports/param_in_port_spec.rb |
spnet-0.1.7 | spec/ports/param_in_port_spec.rb |
spnet-0.1.6 | spec/ports/param_in_port_spec.rb |
spnet-0.1.5 | spec/ports/param_in_port_spec.rb |