Sha256: ed6ed160e871c833ae7b37c9707e84aba8b79d2955c4c9de9ca62e4d82ca9e87

Contents?: true

Size: 617 Bytes

Versions: 1

Compression:

Stored size: 617 Bytes

Contents

require 'test_helper'

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: [{ text: '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

1 entries across 1 versions & 1 rubygems

Version Path
vedeu-0.1.10 test/lib/vedeu/models/attributes/stream_collection_test.rb