require 'bacon' describe 'A new array' do before do @ary = Array.new end it 'should be empty' do @ary.should.be.empty @ary.should.not.include 1 end it 'should have zero size' do @ary.size.should.equal 0 @ary.size.should.be.close 0.1, 0.5 end it 'should raise on trying fetch any index' do lambda { @ary.fetch 0 }. should.raise(IndexError). message.should.match(/out of array/) # Alternatively: should