I have the following in Rspec
response.should redirect_to %r{\A/my_settings/mysub_path/}
I get the following error
NoMethodError: undefined method `model_name' for Regexp:Class
I just need to match a part of my path which contains my_settings/mysub_path. How is this achieved in rspec?
redirect_to expects a string or an active record model.
if you want to match something, you can use
response.location