Sha256: 1eec2b38cf5d04f4cb0121464d88ea00f556af8dd5d6918514830d94b74c1284

Contents?: true

Size: 938 Bytes

Versions: 2

Compression:

Stored size: 938 Bytes

Contents

require 'test_helper'

module Vedeu

  describe Buffers do

    before { Buffers.reset }

    describe '.add' do
      it 'returns the name of the buffer added to storage' do
        Buffers.add({ name: 'molybdenum' }).must_equal('molybdenum')
      end

      it 'raises an exception if the attributes does not have a :name key' do
        attributes = { no_name_key: '' }

        proc { Buffers.add(attributes) }.must_raise(MissingRequired)
      end

      context 'when the buffer is already registered' do
        it 'retrieves the buffer in storage, and adds the attributes to the ' \
        'back buffer, preserving the front which may already have content' do
          skip
        end
      end

      context 'when the buffer was not registered' do
        it 'stores a new buffer by name, and adds the attributes to the back ' \
        'buffer' do
          skip
        end
      end
    end

  end # Buffers

end # Vedeu

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
vedeu-0.2.12 test/lib/vedeu/repositories/buffers_test.rb
vedeu-0.2.11 test/lib/vedeu/repositories/buffers_test.rb