Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
require_relative '../test_helper'
class ThingsControllerTest < ActionController::TestCase
setup do
@thing = things(:default)
end
def test_index
things = [things(:default)]
get :index
assert_response :success
assert_equal things, assigns(:things)
end
def test_show
get :show, :id => @thing
assert_response :success
assert_template :show
assert_equal @thing, assigns(:thing)
end
def test_edit
end
def test_update
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.