Sha256: 80a17ee17c813a3b9649758eeefe69cd2a2dbf9141bf69fc6eb412aadd9a988c
Contents?: true
Size: 753 Bytes
Versions: 2
Compression:
Stored size: 753 Bytes
Contents
require 'spec_helper' describe WP2Middleman::PostCollection do let(:file) { 'spec/fixtures/fixture.xml' } it "exists as a class within the WP2Middleman module" do expect(WP2Middleman::PostCollection.class).to eq Class end it "contains a Post object for every word press item" do posts = WP2Middleman::PostCollection.from_file(file) expect(posts).to_not be_empty posts.each do |post| expect(post).to be_a WP2Middleman::Post end end it "can reject attachments" do post = double :post, attachment?: false attachment = double :post, attachment?: true post_collection = WP2Middleman::PostCollection.new([post, attachment]).without_attachments expect(post_collection.to_a).to eq([post]) end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
wp2middleman-0.0.3 | spec/lib/wp2middleman/post_collection_spec.rb |
wp2middleman-0.0.2 | spec/lib/wp2middleman/post_collection_spec.rb |