Sha256: a5aa0f40ab7de6ac1abee323b16b9b1550be4de92f0c443d167c42d4e30c168f
Contents?: true
Size: 817 Bytes
Versions: 2
Compression:
Stored size: 817 Bytes
Contents
require 'spec_helper' require 'pry' describe "Posts" do before do setup_site end it "lists posts" do 3.times{ FactoryGirl.create(:post) } static_page = FactoryGirl.create(:page) visit url_for([Storytime::BlogPost, only_path: true]) within ".post-list" do Storytime::Post.primary_feed.each do |p| page.should have_content(p.title) page.should have_content(p.excerpt) page.should_not have_content(p.content) end expect(page).not_to have_content(static_page.title) expect(page).not_to have_content(static_page.excerpt) end end it "shows a post" do post = FactoryGirl.create(:post) visit url_for([post, only_path: true]) expect(page).to have_content(post.title) expect(page).to have_content(post.content) end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
storytime-1.2.0 | spec/features/posts_spec.rb |
storytime-1.1.1 | spec/features/posts_spec.rb |