Skip to content

Instantly share code, notes, and snippets.

@revelation
Created August 22, 2008 05:10
Show Gist options
  • Save revelation/6760 to your computer and use it in GitHub Desktop.
Save revelation/6760 to your computer and use it in GitHub Desktop.
it "should allow greedy matches to preceed conditions" do
Merb::Router.prepare do |r|
r.match!("/foo/:bar/something/:else", :bar => /.*/)
end
%w(somewhere somewhere/somehow 123/456/789 i;just/dont-understand).each do |path|
route_to("/foo/#{path}/something/wonderful").should have_route(:bar => path, :else => "wonderful")
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment