Sha256: d994005309a6592a2c77c7524310cc79a027e6e9cda3efbfed8dd502b26c661a

Contents?: true

Size: 551 Bytes

Versions: 1

Compression:

Stored size: 551 Bytes

Contents

require "zeamays"

describe "Zeamays Model example" do
  let(:example_cob_class) {
    class ExampleCobClass < Zeamays::Cob
      gene_sequencing :i8, :i16, :integer, :string
    end
    ExampleCobClass
  }

  let(:cob) { example_cob_class.new }
  let(:record1) { [30, 2000, 500000, "test"] }
  let(:record2) { [80, 1000, 200000, "Example!!! "] }
  before do
    cob.grow(record1)
    cob.grow(record2)
  end

  let(:packaged) { cob.pack }
  let(:unpackaged) { example_cob_class.unpack(packaged) }
  it { unpackaged.should eq [record1, record2] }
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
zeamays-0.0.5 spec/model_test/zeamays_mode_example_spec.rb