Skip to content

Instantly share code, notes, and snippets.

@pawel2105
Last active August 29, 2015 14:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pawel2105/2a707fb07ecb458e9b9c to your computer and use it in GitHub Desktop.
Save pawel2105/2a707fb07ecb458e9b9c to your computer and use it in GitHub Desktop.
class ArticlesController < ApplicationController
def index
@articles = Article.all
end
end
require 'test_helper'
class ArticlesControllerTest < ActionController::TestCase
test "GET index responds successfully" do
get :index
assert_response :success, @response.body # passes
assert_template 'index' # expecting <"new"> but rendering with <[]>
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment