Advertisement
Guest User

Untitled

a guest
May 25th, 2015
246
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.69 KB | None | 0 0
  1. require 'test_helper'
  2.  
  3. class IndependentMatcheesControllerTest < ActionController::TestCase
  4. # Without this method I get...
  5. # RuntimeError: @controller is nil: make sure you set it in your test's setup method.
  6. # test/controllers/independent_matchees_controller_test.rb:15:in `block in <class:IndependentMatcheesControllerTest>'
  7. # With it I get...
  8. # NameError: uninitialized constant IndependentMatcheesControllerTest::IndependentMatcheesController
  9. # test/controllers/independent_matchees_controller_test.rb:11:in `setup'
  10. def setup
  11. @controller = IndependentMatcheesController.create
  12. end
  13.  
  14. test "should get index" do
  15. get :index
  16. assert_response :success
  17. end
  18. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement