Sha256: f02c953f93c63febbae033257fd7bc7b86746e62985d6a1ad885ff40dc9aecd5

Contents?: true

Size: 685 Bytes

Versions: 11

Compression:

Stored size: 685 Bytes

Contents

require 'test_helper'
require 'vedeu/models/attributes/stream_collection'
require '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

11 entries across 11 versions & 1 rubygems

Version Path
vedeu-0.1.7 test/lib/vedeu/models/attributes/stream_collection_test.rb
vedeu-0.1.6 test/lib/vedeu/models/attributes/stream_collection_test.rb
vedeu-0.1.5 test/lib/vedeu/models/attributes/stream_collection_test.rb
vedeu-0.1.4 test/lib/vedeu/models/attributes/stream_collection_test.rb
vedeu-0.1.3 test/lib/vedeu/models/attributes/stream_collection_test.rb
vedeu-0.1.2 test/lib/vedeu/models/attributes/stream_collection_test.rb
vedeu-0.1.1 test/lib/vedeu/models/attributes/stream_collection_test.rb
vedeu-0.1.0 test/lib/vedeu/models/attributes/stream_collection_test.rb
vedeu-0.0.42 test/lib/vedeu/models/attributes/stream_collection_test.rb
vedeu-0.0.41 test/lib/vedeu/models/attributes/stream_collection_test.rb
vedeu-0.0.40 test/lib/vedeu/models/attributes/stream_collection_test.rb