I'm using Rails 5 with minitest and trying to run a single test file. The file is "test/controllers/issues_controller_test.rb" so I thought I could run
rake test TEST=test/controllers/issues_controller_test.rb
but I get an error when I try and do this ...
localhost:myproject davea$ rake test TEST=test/controllers/issues_controller_test.rb
Run options: --seed 24216
# Running:
E
Error:
IssuesControllerTest#test_logged_in_should_get_issues_page:
NoMethodError: undefined method `users' for #<IssuesControllerTest:0x007fac86c864c0>
test/controllers/issues_controller_test.rb:7:in `block in <class:IssuesControllerTest>'
bin/rails test test/controllers/issues_controller_test.rb:6
Finished in 0.006048s, 165.3439 runs/s, 0.0000 assertions/s.
1 runs, 0 assertions, 0 failures, 1 errors, 0 skips
Note that when I run "rails test" I do not get any errors at all on this file, so my question is, how do I run a single test file using minitest ?