Sha256: 274a6451d6cd35fa9fa118d3e5544a94d97b3acab1a9245bce4b26807a30f105
Contents?: true
Size: 1.31 KB
Versions: 12
Compression:
Stored size: 1.31 KB
Contents
# encoding: utf-8 require "spec_helper" feature "User visits a blog post" do it "has the title" do post = create(:post, published_at: Time.now) visit blogelator.post_path(post) page.should have_content "My First Blog Post" end it "has the body text" do post = create(:post, published_at: Time.now) visit blogelator.post_path(post) page.should have_content "paragraph with some bold text." end it "has a link to the next and previous post" do random_post = create(:post, title: "Random Post", published_at: Time.now - 12.days) random_post = create(:post, title: "Random Post", published_at: Time.now + 2.days) previous_post = create(:post, title: "Previous Post", published_at: Time.now - 10.days) post = create(:post, published_at: Time.now, published_at: Time.now - 5.days) next_post = create(:post, title: "Next Post", published_at: Time.now, published_at: Time.now) visit blogelator.post_path(post) page.should have_content previous_post.title page.should have_content next_post.title click_link("Previous Post") current_path.should eq(blogelator.post_path(previous_post)) visit blogelator.post_path(post) click_link("Next Post") current_path.should eq(blogelator.post_path(next_post)) end end
Version data entries
12 entries across 12 versions & 1 rubygems