You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've had testing the rspec because I'm on rspec 2 I assume. Here are some of my issues:
1.) "include AuthenticatedSystem" needs to be included
2.) in the "before" statement where they add routes the old way was "ActionController::Routing::Routes.add_route /login_is_required', :controller => 'access_control_test', :action => 'login_is_required'"
INSTEAD USE
begin
_routes = Savingsgame::Application.routes
_routes.disable_clear_and_finalize = true
_routes.clear!
Savingsgame::Application.routes_reloader.paths.each{ |path| load(path) }
_routes.draw do
# here you can add any route you want
get "/login_not_required", :to => "access_control_test#login_not_required"
get "/login_is_required", :to => "access_control_test#login_is_required"
end
ActiveSupport.on_load(:action_controller) { _routes.finalize! }
ensure
_routes.disable_clear_and_finalize = false
end
3.) Because I'm using rspec 2, I need to change all the route_for, params_for and has_text, but those are easy, just look up the https://github.com/rspec/rspec-rails
The text was updated successfully, but these errors were encountered:
I've had testing the rspec because I'm on rspec 2 I assume. Here are some of my issues:
1.) "include AuthenticatedSystem" needs to be included
2.) in the "before" statement where they add routes the old way was "ActionController::Routing::Routes.add_route /login_is_required', :controller => 'access_control_test', :action => 'login_is_required'"
INSTEAD USE
begin
_routes = Savingsgame::Application.routes
_routes.disable_clear_and_finalize = true
_routes.clear!
Savingsgame::Application.routes_reloader.paths.each{ |path| load(path) }
_routes.draw do
# here you can add any route you want
get "/login_not_required", :to => "access_control_test#login_not_required"
get "/login_is_required", :to => "access_control_test#login_is_required"
end
ActiveSupport.on_load(:action_controller) { _routes.finalize! }
ensure
_routes.disable_clear_and_finalize = false
end
3.) Because I'm using rspec 2, I need to change all the route_for, params_for and has_text, but those are easy, just look up the https://github.com/rspec/rspec-rails
The text was updated successfully, but these errors were encountered: