Skip to content

Instantly share code, notes, and snippets.

@wlangstroth
Last active January 3, 2016 04:19
Show Gist options
  • Save wlangstroth/8408612 to your computer and use it in GitHub Desktop.
Save wlangstroth/8408612 to your computer and use it in GitHub Desktop.
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