Sha256: b619d18a42f1f7d4724d461eb432a75e61423217468271558ef057386c41b29a

Contents?: true

Size: 921 Bytes

Versions: 8

Compression:

Stored size: 921 Bytes

Contents

require 'test_helper'

module Vedeu

  module DSL

    describe Stream do

      let(:described) { Vedeu::DSL::Stream }
      let(:instance)  { described.new(model) }
      let(:model)     { Vedeu::Views::Stream.new(parent: parent) }
      let(:client)    {}
      let(:parent)    { Vedeu::Views::Line.new }

      describe '#initialize' do
        it { instance.must_be_instance_of(described) }
        it { instance.instance_variable_get('@model').must_equal(model) }
        it { instance.instance_variable_get('@client').must_equal(client) }
      end

      describe '#stream' do
        subject { instance.stream { } }

        it { subject.must_be_instance_of(Vedeu::Views::Streams) }

        context 'when the block is not given' do
          subject { instance.stream }

          it { proc { subject }.must_raise(Vedeu::Error::RequiresBlock) }
        end
      end

    end # Stream

  end # DSL

end # Vedeu

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
vedeu-0.6.20 test/lib/vedeu/dsl/stream_test.rb
vedeu-0.6.19 test/lib/vedeu/dsl/stream_test.rb
vedeu-0.6.18 test/lib/vedeu/dsl/stream_test.rb
vedeu-0.6.17 test/lib/vedeu/dsl/stream_test.rb
vedeu-0.6.16 test/lib/vedeu/dsl/stream_test.rb
vedeu-0.6.15 test/lib/vedeu/dsl/stream_test.rb
vedeu-0.6.14 test/lib/vedeu/dsl/stream_test.rb
vedeu-0.6.13 test/lib/vedeu/dsl/stream_test.rb