Last active
August 29, 2015 14:08
-
-
Save pawel2105/2a707fb07ecb458e9b9c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ArticlesController < ApplicationController | |
def index | |
@articles = Article.all | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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