Sha256: 59c8e7bd8535a47a259221ddd00fd49e09b113d795176f532f3c0adf35c978cc

Contents?: true

Size: 1.84 KB

Versions: 17

Compression:

Stored size: 1.84 KB

Contents

require 'test_helper'

module Vedeu

  module Buffers

    describe View do

      let(:described)  { Vedeu::Buffers::View }
      let(:instance)   { described.new(attributes) }
      let(:_name)      { 'Vedeu::Buffers::View' }
      let(:attributes) {
        {
          name: _name,
        }
      }

      describe '#initialize' do
        it { instance.must_be_instance_of(described) }

        context 'when a name is given' do
          it { instance.instance_variable_get('@name').must_equal(_name) }
        end

        context 'when a name is not given' do
          let(:_name) {}

          it { instance.instance_variable_get('@name').must_equal('') }
        end
      end

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

        it { subject.must_be_instance_of(Hash) }
        it { subject.must_equal(attributes) }
      end

      describe '#each' do
        # @todo Add more tests.
      end

      describe '#reset!' do
        subject { instance.reset! }

        it { subject.must_be_instance_of(described) }
      end

      describe '#update' do
        let(:value_or_values) {}

        subject { instance.update(value_or_values) }

        it { subject.must_be_instance_of(described) }

        context 'when given a single value' do
          let(:value_or_values) {}

          context 'when the value is valid' do
            # @todo Add more tests.
          end

          context 'when the value is not valid' do
            # @todo Add more tests.
          end
        end

        context 'when given multiple values' do
          let(:value_or_values) {}

          context 'when the value is valid' do
            # @todo Add more tests.
          end

          context 'when the value is not valid' do
            # @todo Add more tests.
          end
        end
      end

    end # View

  end # Buffers

end # Vedeu

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
vedeu-0.8.0 test/lib/vedeu/buffers/view_test.rb
vedeu-0.7.4 test/lib/vedeu/buffers/view_test.rb
vedeu-0.7.3 test/lib/vedeu/buffers/view_test.rb
vedeu-0.7.2 test/lib/vedeu/buffers/view_test.rb
vedeu-0.7.1 test/lib/vedeu/buffers/view_test.rb
vedeu-0.7.0 test/lib/vedeu/buffers/view_test.rb
vedeu-0.6.71 test/lib/vedeu/buffers/view_test.rb
vedeu-0.6.70 test/lib/vedeu/buffers/view_test.rb
vedeu-0.6.69 test/lib/vedeu/buffers/view_test.rb
vedeu-0.6.68 test/lib/vedeu/buffers/view_test.rb
vedeu-0.6.67 test/lib/vedeu/buffers/view_test.rb
vedeu-0.6.66 test/lib/vedeu/buffers/view_test.rb
vedeu-0.6.65 test/lib/vedeu/buffers/view_test.rb
vedeu-0.6.64 test/lib/vedeu/buffers/view_test.rb
vedeu-0.6.63 test/lib/vedeu/buffers/view_test.rb
vedeu-0.6.62 test/lib/vedeu/buffers/view_test.rb
vedeu-0.6.61 test/lib/vedeu/buffers/view_test.rb