Sha256: 2cc7a48949b007695108e0a01e641d50ae1459a7550986c451638853c57d66f1

Contents?: true

Size: 762 Bytes

Versions: 6

Compression:

Stored size: 762 Bytes

Contents

require_relative '../../../../test_helper'
require_relative '../../../../../lib/vedeu/models/attributes/stream_collection'
require_relative '../../../../../lib/vedeu/models/line'

module Vedeu
  describe StreamCollection do
    describe '#coerce' do
      it 'returns an empty array when there is no stream' do
        Line.new.streams.must_equal([])
      end

      it 'contains a single Stream when there is a single stream' do
        Line.new({ streams: 'some text' }).streams.size
          .must_equal(1)
      end

      it 'contains multiple Stream when there are multiple streams' do
        Line.new({ streams: [
          { text: 'some text' },
          { text: 'some more text' }
        ] }).streams.size.must_equal(2)
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
vedeu-0.0.39 test/lib/vedeu/models/attributes/stream_collection_test.rb
vedeu-0.0.38 test/lib/vedeu/models/attributes/stream_collection_test.rb
vedeu-0.0.37 test/lib/vedeu/models/attributes/stream_collection_test.rb
vedeu-0.0.36 test/lib/vedeu/models/attributes/stream_collection_test.rb
vedeu-0.0.35 test/lib/vedeu/models/attributes/stream_collection_test.rb
vedeu-0.0.34 test/lib/vedeu/models/attributes/stream_collection_test.rb