Sha256: 415c2f67e375e1d98113bc46ef859fcfa145859c925f15323143171f8a686a91

Contents?: true

Size: 1.33 KB

Versions: 2

Compression:

Stored size: 1.33 KB

Contents

require 'test_helper'

module Vedeu

  module Null

    describe Interface do

      let(:described) { Vedeu::Null::Interface }
      let(:instance)  { described.new(_name) }
      let(:_name)     {}

      describe '#initialize' do
        it { instance.must_be_instance_of(described) }
        it { instance.instance_variable_get('@name').must_equal(_name) }
      end

      describe 'accessors' do
        it { instance.must_respond_to(:name) }
      end

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

        it { subject.must_be_instance_of(Hash) }
      end

      describe '#null?' do
        subject { instance.null? }

        it { subject.must_be_instance_of(TrueClass) }
      end

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

        it { subject.must_be_instance_of(NilClass) }
      end

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

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

      describe '#visible?' do
        subject { instance.visible? }

        it { subject.must_be_instance_of(FalseClass) }
      end

      describe '#visible=' do
        subject { instance.visible=(:irrelevant) }

        # @todo
        # it { skip }
        # it { subject.must_be_instance_of(FalseClass) }
      end

    end # Interface

  end # Null

end # Vedeu

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
vedeu-0.4.53 test/lib/vedeu/null/interface_test.rb
vedeu-0.4.52 test/lib/vedeu/null/interface_test.rb