To be specific, I’m trying to get ActionController::Routing::Routes.recognize_path to recognize a route that is not in routes.rb, for testing purposes.
Is it possible to somehow mock or dynamically add a route? I’m using Rspec with Mocha.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I have absolutely no idea whether will work but you could experiment with something like this: