Sha256: 3be90966325f29a81a12d4b49f26ca3f7a25d86d2e213fe1c53d1f9983bfb3cb
Contents?: true
Size: 544 Bytes
Versions: 1
Compression:
Stored size: 544 Bytes
Contents
# encoding: utf-8 require 'spec_helper' describe Attribute, '.descendants' do subject { object.descendants } let(:object) { Class.new(described_class) } context 'when there are no descendants' do it_should_behave_like 'an idempotent method' it { should be_empty } end context 'when there are descendants' do let(:descendant) { Class.new(object) } before do descendant # trigger the class inhertance end it_should_behave_like 'an idempotent method' it { should == [ descendant ] } end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
veritas-0.0.4 | spec/unit/veritas/attribute/class_methods/descendants_spec.rb |