Sha256: e4c365483378f9629c68667c17342a25e29d67f7f69bbd36e74259d98262ccc5

Contents?: true

Size: 886 Bytes

Versions: 53

Compression:

Stored size: 886 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::Stream.new(parent: parent) }
      let(:client)    {}
      let(:parent)    { Vedeu::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::Streams) }

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

          it { proc { subject }.must_raise(InvalidSyntax) }
        end
      end

    end # Stream

  end # DSL

end # Vedeu

Version data entries

53 entries across 53 versions & 1 rubygems

Version Path
vedeu-0.4.30 test/lib/vedeu/dsl/stream_test.rb
vedeu-0.4.29 test/lib/vedeu/dsl/stream_test.rb
vedeu-0.4.28 test/lib/vedeu/dsl/stream_test.rb
vedeu-0.4.27 test/lib/vedeu/dsl/stream_test.rb
vedeu-0.4.26 test/lib/vedeu/dsl/stream_test.rb
vedeu-0.4.25 test/lib/vedeu/dsl/stream_test.rb
vedeu-0.4.24 test/lib/vedeu/dsl/stream_test.rb
vedeu-0.4.23 test/lib/vedeu/dsl/stream_test.rb
vedeu-0.4.22 test/lib/vedeu/dsl/stream_test.rb
vedeu-0.4.21 test/lib/vedeu/dsl/stream_test.rb
vedeu-0.4.20 test/lib/vedeu/dsl/stream_test.rb
vedeu-0.4.19 test/lib/vedeu/dsl/stream_test.rb
vedeu-0.4.18 test/lib/vedeu/dsl/stream_test.rb