Sha256: 51816b0a1af7885d224851d18caa804aa49d7d27c711cd0afe4fddea5bc88fed
Contents?: true
Size: 604 Bytes
Versions: 12
Compression:
Stored size: 604 Bytes
Contents
# encoding: utf-8 require 'spec_helper' describe DescendantsTracker, '#descendants' do subject { object.descendants } let(:described_class) { Class.new { extend 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
12 entries across 10 versions & 4 rubygems