Sha256: 15a89b4599efa195aa026048f121191c236a324ec8bbbb6fea2991270a9e375a

Contents?: true

Size: 1.38 KB

Versions: 9

Compression:

Stored size: 1.38 KB

Contents

require 'test_helper'

module Vedeu

  module Null

    describe View do

      let(:described)  { Vedeu::Null::View }
      let(:instance)   { described.new(attributes) }
      let(:attributes) {
        {
          name:    'vedeu_null_view',
          visible: true,
        }
      }

      describe '#initialize' do
        it { instance.must_be_instance_of(described) }
        it { instance.instance_variable_get('@attributes').must_equal(attributes) }
        it { instance.instance_variable_get('@name').must_equal('vedeu_null_view') }
        it { instance.instance_variable_get('@visible').must_equal(false) }
      end

      describe 'accessors' do
        it { instance.must_respond_to(:name) }
        it { instance.must_respond_to(:attributes) }
        it { instance.must_respond_to(:visible) }
        it { instance.must_respond_to(:visible=) }
        it { instance.must_respond_to(:visible?) }
      end

      describe '#null' do
        it { instance.null.must_equal(nil) }

        it { instance.must_respond_to(:parent) }
        it { instance.must_respond_to(:zindex) }
      end

      describe '#null?' do
        it { instance.null?.must_equal(true) }
      end

      describe '#store' do
        it { instance.store.must_equal(instance) }
      end

      describe '#visible?' do
        it { instance.visible?.must_equal(false) }
      end

    end # View

  end # Null

end # Vedeu

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
vedeu-0.6.6 test/lib/vedeu/null/view_test.rb
vedeu-0.6.5 test/lib/vedeu/null/view_test.rb
vedeu-0.6.4 test/lib/vedeu/null/view_test.rb
vedeu-0.6.3 test/lib/vedeu/null/view_test.rb
vedeu-0.6.2 test/lib/vedeu/null/view_test.rb
vedeu-0.6.1 test/lib/vedeu/null/view_test.rb
vedeu-0.6.0 test/lib/vedeu/null/view_test.rb
vedeu-0.5.13 test/lib/vedeu/null/view_test.rb
vedeu-0.5.12 test/lib/vedeu/null/view_test.rb