Sha256: 2c7455aa986d03388561867e823f14edfa600f73ee65fcd881faed7f57bad95b
Contents?: true
Size: 611 Bytes
Versions: 17
Compression:
Stored size: 611 Bytes
Contents
require 'spec_helper' describe Virtus::DescendantsTracker, '#descendants' do subject { object.descendants } let(:described_class) { Class.new { extend Virtus::DescendantsTracker } } let(:object) { 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) } # trigger the class inhertance it_should_behave_like 'an idempotent method' it { should eql([ descendant ]) } end end
Version data entries
17 entries across 17 versions & 2 rubygems