Rspec - redirect_to a path matching a regexp

Viewed 3256

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?

3 Answers
Related