Sha256: eef73b92db074a0e3881cee51a214bcb77e7ab909a879ca84b5b1ea03c6eaf6b
Contents?: true
Size: 771 Bytes
Versions: 9
Compression:
Stored size: 771 Bytes
Contents
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper') describe Program do before :all do @p = Program.new([0...5,3.0...6.5,("1/2".to_r)...("3/2".to_r)]) @a = @p.pack @p2 = Program.unpack(@a) end describe '#pack' do it 'should return an Array' do @a.should be_a Array end it 'should return an array with same size as # of segments' do @a.size.should eq @p.segments.size end it 'should return an array of strings' do @a.each {|x| x.should be_a String } end end describe '#unpack' do it 'should return a Program' do @p2.should be_a Program end it 'should successfully unpack program segments' do @p2.segments.should eq @p.segments end end end
Version data entries
9 entries across 9 versions & 1 rubygems