Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding an empty controller{} fails when before get
Test output when uncommented: ``` $ bundle exec rspec -fd RedirectIfRequestedConcern is expected not to be redirect is expected to have attributes {:body => "Test controller, test method"} with redirect_me=yes example at ./spec/app/controllers/concerns/redirect_if_requested_concern_spec.rb:27 (FAILED - 1) HomeController #show example at ./spec/app/controllers/home_controller_spec.rb:15 (FAILED - 2) example at ./spec/app/controllers/home_controller_spec.rb:16 (FAILED - 3) with redirect_me=yes example at ./spec/app/controllers/home_controller_spec.rb:21 (FAILED - 4) Failures: 1) RedirectIfRequestedConcern with redirect_me=yes Failure/Error: redirect_to url_for(redirected_from_concern: true) if params[:redirect_me] == 'yes' ActionController::UrlGenerationError: No route matches {:action=>"test", :controller=>"anonymous", :redirected_from_concern=>true} # ./app/controllers/concerns/redirect_if_requested_concern.rb:11:in `redirect_if_requested' # /Users/henryblyth/.rbenv/versions/2.6.7/gemsets/rails-bug-app/gems/actiontext-6.1.3.2/lib/action_text/rendering.rb:20:in `with_renderer' # /Users/henryblyth/.rbenv/versions/2.6.7/gemsets/rails-bug-app/gems/actiontext-6.1.3.2/lib/action_text/engine.rb:55:in `block (4 levels) in <class:Engine>' # ./spec/app/controllers/concerns/redirect_if_requested_concern_spec.rb:16:in `block (2 levels) in <top (required)>' 2) HomeController#show Failure/Error: before { get :show, params: params, session: nil } ActionController::UrlGenerationError: No route matches {:action=>"show", :controller=>"home"} # ./spec/app/controllers/home_controller_spec.rb:9:in `block (3 levels) in <main>' 3) HomeController#show Failure/Error: before { get :show, params: params, session: nil } ActionController::UrlGenerationError: No route matches {:action=>"show", :controller=>"home"} # ./spec/app/controllers/home_controller_spec.rb:9:in `block (3 levels) in <main>' 4) HomeController#show with redirect_me=yes Failure/Error: before { get :show, params: params, session: nil } ActionController::UrlGenerationError: No route matches {:action=>"show", :controller=>"home", :redirect_me=>"yes"} # ./spec/app/controllers/home_controller_spec.rb:9:in `block (3 levels) in <main>' Finished in 0.57528 seconds (files took 1.84 seconds to load) 6 examples, 4 failures Failed examples: rspec ./spec/app/controllers/concerns/redirect_if_requested_concern_spec.rb:27 # RedirectIfRequestedConcern with redirect_me=yes rspec ./spec/app/controllers/home_controller_spec.rb:15 # HomeController#show rspec ./spec/app/controllers/home_controller_spec.rb:16 # HomeController#show rspec ./spec/app/controllers/home_controller_spec.rb:21 # HomeController#show with redirect_me=yes ```
- Loading branch information