Skip to content

Instantly share code, notes, and snippets.

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