Skip to content

Instantly share code, notes, and snippets.

@Dohko
Created July 25, 2009 10:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Dohko/154771 to your computer and use it in GitHub Desktop.
Save Dohko/154771 to your computer and use it in GitHub Desktop.
/Users/morgan/.gem/ruby/1.8/gems/actionpack-2.3.2/lib/action_controller/routing/route.rb:253:in `extra_keys'
/Users/morgan/.gem/ruby/1.8/gems/actionpack-2.3.2/lib/action_controller/routing/route.rb:253:in `map'
/Users/morgan/.gem/ruby/1.8/gems/actionpack-2.3.2/lib/action_controller/routing/route.rb:253:in `extra_keys'
/Users/morgan/.gem/ruby/1.8/gems/actionpack-2.3.2/lib/action_controller/routing/route.rb:132:in `generate'
/Users/morgan/.gem/ruby/1.8/gems/actionpack-2.3.2/lib/action_controller/routing/route_set.rb:384:in `generate'
/Users/morgan/.gem/ruby/1.8/gems/actionpack-2.3.2/lib/action_controller/url_rewriter.rb:205:in `rewrite_path'
/Users/morgan/.gem/ruby/1.8/gems/actionpack-2.3.2/lib/action_controller/url_rewriter.rb:184:in `rewrite_url'
/Users/morgan/.gem/ruby/1.8/gems/actionpack-2.3.2/lib/action_controller/url_rewriter.rb:162:in `rewrite'
/Users/morgan/.gem/ruby/1.8/gems/actionpack-2.3.2/lib/action_controller/base.rb:625:in `url_for'
/Users/morgan/.gem/ruby/1.8/gems/actionpack-2.3.2/lib/action_view/helpers/url_helper.rb:85:in `send'
/Users/morgan/.gem/ruby/1.8/gems/actionpack-2.3.2/lib/action_view/helpers/url_helper.rb:85:in `url_for'
require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
include ActionController::UrlWriter
describe 'map' do
before do
ActionController::Routing::Routes.draw { |map| map.page 'page-:permalink.html', :controller => 'page', :action => 'show' }
end
it "should be matched" do
page_path('test').should == '/page-test.html'
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment