Sha256: 8f8a52464cda4e4dae7d2bef3d796ea8db02e10d953aaf05d1729c07ef3b930e

Contents?: true

Size: 1.52 KB

Versions: 6

Compression:

Stored size: 1.52 KB

Contents

require 'test_helper'

module Vedeu

  module Null

    describe Generic do

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

      describe 'alias methods' do
        it { instance.must_respond_to(:visible?) }
      end

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

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

        it { subject.must_be_instance_of(NilClass) }
      end

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

        it { subject.must_be_instance_of(NilClass) }
      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(described) }
      end

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

        it { subject.must_be_instance_of(NilClass) }
      end

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

        it { subject.must_be_instance_of(FalseClass) }
      end

      describe '#visible=' do
        let(:_value) { :ignored }

        subject { instance.visible = (_value) }

        # This should be FalseClass, I'm explicitly returning false in the method.
        it { subject.must_be_instance_of(Symbol) }
      end

    end # Generic

  end # Null

end # Vedeu

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
vedeu-0.4.54 test/lib/vedeu/null/generic_test.rb
vedeu-0.4.53 test/lib/vedeu/null/generic_test.rb
vedeu-0.4.52 test/lib/vedeu/null/generic_test.rb
vedeu-0.4.51 test/lib/vedeu/null/generic_test.rb
vedeu-0.4.50 test/lib/vedeu/null/generic_test.rb
vedeu-0.4.49 test/lib/vedeu/null/generic_test.rb