Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- describe UrlPosts, "router" do
- HASH = "8sdf7d8"
- it "dispatches GET to app root to UrlPosts#new" do
- request_to("/", :get).should route_to(UrlPosts, :new)
- end
- it "dispatches GET to /<7-and-more-alphanumerics> to UrlPosts#show" do
- request_to("/#{HASH}", :get).should route_to(UrlPosts, :show)
- end
- it "DOES NOT dispatch GET to /<2-and-more-alphanumerics> to UrlPosts#show" do
- request_to("/8s", :get).should_not route_to(UrlPosts, :show)
- end
- it "dispatches alphanumerics after / as :hash parameter" do
- request_to("/#{HASH}").should route_to(UrlPosts, :show).with(:hash => HASH)
- end
- end
Add Comment
Please, Sign In to add comment