Sha256: d8204f6cdfc0ec78c813c156fbde9f009883b0c6dcee22cfb4a58e3ee1c2feee
Contents?: true
Size: 564 Bytes
Versions: 11
Compression:
Stored size: 564 Bytes
Contents
require 'helper' class Base extend Olelo::Factory end class A < Base end class B < Base end describe 'Olelo::Factory' do it 'should have #register' do Base.registry.should.be.empty Base.register :a, A Base.registry[:a].should.equal nil Base.registry['a'].should.equal A Base.register :b, B Base.registry['b'].should.equal B lambda { Base.register :a, A }.should.raise ArgumentError end it 'should have #[]' do Base[:a].should.equal A Base[:b].should.equal B lambda { Base[:c] }.should.raise NameError end end
Version data entries
11 entries across 11 versions & 1 rubygems