Sha256: c686a47245fc47e64ed4a3e8bfd1ed9fa87ae189d6ae9758fe41cd604d045a47

Contents?: true

Size: 527 Bytes

Versions: 2

Compression:

Stored size: 527 Bytes

Contents

require 'spec_helper'

describe "Posts" do
  before do
    setup_site
  end
  
  it "lists posts" do
    3.times{ FactoryGirl.create(:post) }
    visit posts_path

    Storytime::Post.all.each do |p|
      page.should have_content(p.title)
      page.should have_content(p.excerpt)
      page.should_not have_content(p.content)
    end
  end

  it "shows a post" do
    post = FactoryGirl.create(:post)
    visit post_path(post)

    page.should have_content(post.title)
    page.should have_content(post.content)
  end
  
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
storytime-0.0.2 spec/features/posts_spec.rb
storytime-0.0.1 spec/features/posts_spec.rb