Sha256: 197ed00fb5fe30f72fd23ef892391acc3c1676cff1418f4548cfe3f863e95ede

Contents?: true

Size: 1.74 KB

Versions: 15

Compression:

Stored size: 1.74 KB

Contents

require 'test_helper'

module Vedeu

  module Null

    describe Generic do

      let(:described) { Vedeu::Null::Generic }
      let(:instance)  { described.new(attributes) }
      let(:attributes){
        {
          name: _name
        }
      }
      let(:_name) { 'null_generic' }

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

      describe '#initialize' do
        it { instance.must_be_instance_of(described) }
        it {
          instance.instance_variable_get('@attributes').must_equal(attributes)
        }
      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

15 entries across 15 versions & 1 rubygems

Version Path
vedeu-0.5.3 test/lib/vedeu/null/generic_test.rb
vedeu-0.5.2 test/lib/vedeu/null/generic_test.rb
vedeu-0.5.1 test/lib/vedeu/null/generic_test.rb
vedeu-0.5.0 test/lib/vedeu/null/generic_test.rb
vedeu-0.4.65 test/lib/vedeu/null/generic_test.rb
vedeu-0.4.64 test/lib/vedeu/null/generic_test.rb
vedeu-0.4.63 test/lib/vedeu/null/generic_test.rb
vedeu-0.4.62 test/lib/vedeu/null/generic_test.rb
vedeu-0.4.61 test/lib/vedeu/null/generic_test.rb
vedeu-0.4.60 test/lib/vedeu/null/generic_test.rb
vedeu-0.4.59 test/lib/vedeu/null/generic_test.rb
vedeu-0.4.58 test/lib/vedeu/null/generic_test.rb
vedeu-0.4.57 test/lib/vedeu/null/generic_test.rb
vedeu-0.4.56 test/lib/vedeu/null/generic_test.rb
vedeu-0.4.55 test/lib/vedeu/null/generic_test.rb