Rspec not hitting controller method/ Controller method not found
I have a controller called as Account -> login(method) and in spec account_controller_spec.rb require 'spec_helper' describe AccountController, :type => :controller do it "login" do get :login response.should be_successful end end but its not hitting the controller method. test is passing may i know the reason?
My Purposed solution on LinkedIn
1. change get :login with get 'accounts/login' OR use rails route helper in for this 2. also if it did not get routes_helpers then include this line in your spec_helper.rb config.include Rails.application.routes.url_helpers 3. one more thing in your project directory in terminal/console/cmd run this command tail -f log/test.log AND Then run this test again. You can see the work flow behind the sceen.