Sha256: 6f3a9771da52fa1d8f0b3bba8c9ad668277a669b8ecadb650dfb7bc7ea076968
Contents?: true
Size: 762 Bytes
Versions: 4
Compression:
Stored size: 762 Bytes
Contents
require 'spec_helper' describe "Posts" do before do setup_site end it "lists posts" do 3.times{ FactoryGirl.create(:post) } static_page = FactoryGirl.create(:page) visit "/" 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
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
storytime-1.0.7 | spec/features/posts_spec.rb |
storytime-1.0.6 | spec/features/posts_spec.rb |
storytime-1.0.5 | spec/features/posts_spec.rb |
storytime-1.0.2 | spec/features/posts_spec.rb |