spec/dicer/context/description_spec.rb in dicer-0.1.0 vs spec/dicer/context/description_spec.rb in dicer-0.2.0

- old
+ new

@@ -2,10 +2,14 @@ describe Dicer::Context::Description do subject(:description) do Dicer::Context::Description.new(Entity) do it_behaves_like Cleaner + + role :cleaner do + it_behaves_like Cleaner + end end end describe '#described_class' do subject { description.described_class } @@ -14,11 +18,22 @@ end describe '#behaviors' do subject { description.behaviors } - it { should have(1).behavior } - it { should include(Cleaner) } + it { should be_a(Hash) } + + describe '#default' do + subject { description.behaviors.default } + + it { should include(Cleaner) } + end + + describe '[:cleaner]' do + subject { description.behaviors[:cleaner] } + + it { should include(Cleaner) } + end end describe '#delegator' do subject { description.delegator }