Permalink
Browse files

Expands README examples for controller specs [ci skip]

  • Loading branch information...
alindeman committed Feb 17, 2013
1 parent 9b80459 commit 559dd496a96299f1c8b5d63bf143204d0d20c900
Showing with 12 additions and 1 deletion.
  1. +12 −1 README.md
View
@@ -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

0 comments on commit 559dd49

Please sign in to comment.