Sha256: 9b39bd4b45644e5376e4f81cf210a91473327869dd76316da8461ee4cd7ced4b
Contents?: true
Size: 966 Bytes
Versions: 3
Compression:
Stored size: 966 Bytes
Contents
require_relative '../../../test_helper' require_relative '../../../../lib/vedeu/models/line_collection' require_relative '../../../../lib/vedeu/models/interface' module Vedeu describe LineCollection do describe '#coerce' do it 'returns an empty collection when there are no lines' do Interface.new({ lines: {} }).lines.must_equal([]) end it 'contains a single Line object when the line is just a String' do Interface.new({ lines: 'some text' }).lines.size .must_equal(1) end it 'contains a single Line object when there is a single line' do Interface.new({ lines: { streams: { text: 'some text' } } }) .lines.size.must_equal(1) end it 'contains multiple Line objects when there are multiple lines' do Interface.new({ lines: [ { text: 'some text' }, { text: 'some more text' } ] }).lines.size.must_equal(2) end end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
vedeu-0.0.33 | test/lib/vedeu/models/line_collection_test.rb |
vedeu-0.0.32 | test/lib/vedeu/models/line_collection_test.rb |
vedeu-0.0.31 | test/lib/vedeu/models/line_collection_test.rb |