Sha256: d87b8e4b9f35fcdee94e40500893ed3bb266f50d1351b0c2fbccaac55009f6ca
Contents?: true
Size: 1.56 KB
Versions: 17
Compression:
Stored size: 1.56 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 '#null' do subject { instance.null } it { subject.must_be_instance_of(NilClass) } it { instance.must_respond_to(:add) } it { instance.must_respond_to(:colour) } it { instance.must_respond_to(:parent) } it { instance.must_respond_to(:style) } end describe '#null?' do subject { instance.null? } it { subject.must_be_instance_of(TrueClass) } end describe '#store' do subject { instance.store } it { subject.must_be_instance_of(described) } 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
17 entries across 17 versions & 1 rubygems