Sha256: 02da4eaaa342d4774cb813165421795c0b2d69ae6f72eff857f32d9dbf6e3fbe

Contents?: true

Size: 1.29 KB

Versions: 3

Compression:

Stored size: 1.29 KB

Contents

require 'test_helper'

module Vedeu

  module Views

  	describe View do

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

      describe 'accessors' do
        it { instance.must_respond_to(:attributes) }
        it { instance.must_respond_to(:client) }
        it { instance.must_respond_to(:client=) }
        it { instance.must_respond_to(:name) }
        it { instance.must_respond_to(:name=) }
        it { instance.must_respond_to(:parent) }
        it { instance.must_respond_to(:parent=) }
        it { instance.must_respond_to(:lines=) }
        it { instance.must_respond_to(:zindex) }
        it { instance.must_respond_to(:zindex=) }
      end

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

        it { subject.must_be_instance_of(described) }
      end

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

        it { subject.must_be_instance_of(described) }

        context 'when the name is not defined' do
          let(:_name) {}

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

  	end # View

  end # Views

end # Vedeu

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
vedeu-0.5.10 test/lib/vedeu/models/views/view_test.rb
vedeu-0.5.9 test/lib/vedeu/models/views/view_test.rb
vedeu-0.5.8 test/lib/vedeu/models/views/view_test.rb