Sha256: 1d43e4c32a47f992b20b4c9e4d7f0e8146a1120a8e98ada508ebe5ab616a5429
Contents?: true
Size: 803 Bytes
Versions: 10
Compression:
Stored size: 803 Bytes
Contents
class A end class B end shared_examples_for 'Clazz Registry' do let(:hash1) do {:a => A, :b => B} end let(:hash2) do {:c => 3} end describe 'register' do before do subject.register :a, A end its(:registered) { should include(:a) } specify do lambda { subject.register :b, 3 }.should raise_error end end describe 'append <<' do before do subject << hash1 end its(:registered) { should include(*hash1.keys) } its(:registered_classes) { should include(*hash1.values) } specify do lambda { subject << hash2 }.should raise_error end end describe 'set index []=' do before do subject.clean! subject[:a] = B end its(:registered_classes) { should include(B) } end end
Version data entries
10 entries across 10 versions & 1 rubygems