Sha256: 0cc95d54d6073136ed8dc8e5363febf50cee3ced5ed58a9579cc8994380db9b1

Contents?: true

Size: 722 Bytes

Versions: 11

Compression:

Stored size: 722 Bytes

Contents

require 'test_helper'

module Vedeu

  describe Buffers do

    let(:described) { Vedeu::Buffers }
    let(:instance)  { described.buffers }

    after do
      Vedeu.buffers.reset
      Vedeu.interfaces.reset
    end

    describe '#by_name' do
      let(:_name) { 'carbon' }

      subject { described.buffers.by_name(_name) }

      context 'when the buffer exists' do
        before do
          Vedeu.interface 'carbon' do
          end
        end

        it { subject.must_be_instance_of(Vedeu::Buffer) }
      end

      context 'when the buffer does not exist' do
        let(:_name) { 'nitrogen' }

        it { subject.must_be_instance_of(Vedeu::Null::Buffer) }
      end
    end

  end # Buffers

end # Vedeu

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
vedeu-0.4.40 test/lib/vedeu/repositories/repositories/buffers_test.rb
vedeu-0.4.39 test/lib/vedeu/repositories/repositories/buffers_test.rb
vedeu-0.4.38 test/lib/vedeu/repositories/repositories/buffers_test.rb
vedeu-0.4.37 test/lib/vedeu/repositories/repositories/buffers_test.rb
vedeu-0.4.36 test/lib/vedeu/repositories/repositories/buffers_test.rb
vedeu-0.4.35 test/lib/vedeu/repositories/repositories/buffers_test.rb
vedeu-0.4.34 test/lib/vedeu/repositories/repositories/buffers_test.rb
vedeu-0.4.33 test/lib/vedeu/repositories/repositories/buffers_test.rb
vedeu-0.4.32 test/lib/vedeu/repositories/repositories/buffers_test.rb
vedeu-0.4.31 test/lib/vedeu/repositories/repositories/buffers_test.rb
vedeu-0.4.30 test/lib/vedeu/repositories/repositories/buffers_test.rb