Sha256: 5bda7f77ff33661768b6422999f11f5ee8c93ba1c8297645e961ee1191854e14
Contents?: true
Size: 943 Bytes
Versions: 2
Compression:
Stored size: 943 Bytes
Contents
require 'message_helper' describe IB::Messages::Outgoing do context 'Newly instantiated Message' do subject do IB::Messages::Outgoing::RequestAccountData.new( :subscribe => true, :account_code => 'DUH') end it { should be_an IB::Messages::Outgoing::RequestAccountData } its(:message_type) { should == :RequestAccountData } its(:message_id) { should == 6 } its(:data) { should == {:subscribe=>true, :account_code=>"DUH"}} its(:subscribe) { should == true } its(:account_code) { should == 'DUH' } its(:to_human) { should =~ /RequestAccountData/ } it 'has class accessors as well' do subject.class.message_type.should == :RequestAccountData subject.class.message_id.should == 6 subject.class.version.should == 2 end it 'encodes into Array' do subject.encode.should == [6, 2, true, "DUH"] end end end # describe IB::Messages:Outgoing
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
ib-ruby-0.6.1 | spec/ib-ruby/messages/outgoing_spec.rb |
ib-ruby-0.5.21 | spec/ib-ruby/messages/outgoing_spec.rb |