Sha256: ad16c59f18c65b22aa9b0d0551f5d9420a40e8bc433a9dd31ab0ee722841f9df

Contents?: true

Size: 730 Bytes

Versions: 4

Compression:

Stored size: 730 Bytes

Contents

require 'model_helper'

describe IB::Models::Underlying do # AKA IB::Underlying

  let(:props) do
    {:con_id => 234567,
     :delta => 0.55,
     :price => 20.5,
    }
  end

  let(:human) do
    /<Underlying: con_id: 234567 .*delta: 0.55 price: 20.5.*>/
  end

  let(:errors) do
    {:delta => ['is not a number'],
     :price => ['is not a number'],
    }
  end

  let(:assigns) do
    {[:con_id, :delta, :price] => numeric_assigns,
    }
  end

  it_behaves_like 'Model'
  it_behaves_like 'Self-equal Model'

  context 'using shortest class name without properties' do
    subject { IB::Underlying.new }
    it_behaves_like 'Model instantiated empty'
    it_behaves_like 'Self-equal Model'
  end

end # describe IB::Contract

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
ib-ruby-0.7.11 spec/ib-ruby/models/underlying_spec.rb
ib-ruby-0.7.10 spec/ib-ruby/models/underlying_spec.rb
ib-ruby-0.7.9 spec/ib-ruby/models/underlying_spec.rb
ib-ruby-0.7.8 spec/ib-ruby/models/underlying_spec.rb