rspec route testing and hosts
问题 I see I can test routes with rspec like this: get("/").should route_to("welcome#index") but I have constraints based on the hostname or parts of hostnames and redirects between several ones. How do I specify a hostname when testing? How do I run the tests with proper configuration? I tried printing root_url and I got: Missing host to link to! Please provide the :host parameter, set default_url_options[:host], or set :only_path to true 回答1: The same error happens on mine whenever I run rspec