Sha256: b03c6b1b17d8a6042bb13572e39f5e94aed87901c9e4ac9ba856523e3098918f
Contents?: true
Size: 611 Bytes
Versions: 1
Compression:
Stored size: 611 Bytes
Contents
require 'helper' describe Feedlr::Collection do describe '::new' do it 'should have Feedlr::Base elements when the elements are hashes' do collection = Feedlr::Collection.new([{ a: 1 }, { b: 2 }]) expect(collection.first).to be_a(Feedlr::Base) end it 'should have normal elements when the elements are not hashes' do collection = Feedlr::Collection.new([1, { z: 5 }]) expect(collection.first).to be_a(Integer) end end describe '#is_a?' do it 'should be subclass of Array' do expect(Feedlr::Collection.new([{ a: 1 }])).to be_an(Array) end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
feedlr-0.1.0 | spec/feedly/collection_spec.rb |