Displaying 2 results from an estimated 2 matches for "routing_spec".
2008 Jun 25
0
Rspec routing_spec failing on nested singular resource
This should be easy to solve; I''m trying to get an Rspec routing_spec
working with a singular nested resource;
map.resources :users do |user|
user.resource :profile
end
All the tests in the profile_routing_spec seem to be failing because
they can''t match the routes, for example;
# The spec
describe ProfileController do
describe "route generation&...
2011 Mar 17
0
Testing route with proc --- possible and how?
...; /[a-zA-Z0-9]{7}/ }
It works correctly at the ui. However am having trouble getting a spec
working for it. Note that in the UI the user must be logged in to get to the
url, but the traffic first hits the directed route and then app controller
handles if the user is not logged in.
In spec/routing/routing_spec.rb (note that all necessary test data for it to
pass is set up and verified):
describe "Shorter URL redirect" do
it "routes GET ''STU1VWX'' to stations/1" do
{ :get => "/", :hash => "STU1VWX" }.should route_to(
:controller =...