Skip to content

Commit

Permalink
Expands README examples for controller specs [ci skip]
Browse files Browse the repository at this point in the history
  • Loading branch information
alindeman committed Feb 17, 2013
1 parent 9b80459 commit 559dd49
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,18 @@ require "spec_helper"

describe PostsController do
describe "GET #index" do
it "loads all of the posts" do
it "responds successfully with an HTTP 200 status code" do
get :index
expect(response).to be_success
expect(response.code).to eq(200)
end

it "renders the index template" do
get :index
expect(response).to render_template("index")
end

it "loads all of the posts into @posts" do
post1, post2 = Post.create!, Post.create!
get :index

Expand Down

0 comments on commit 559dd49

Please sign in to comment.