Skip to content

Instantly share code, notes, and snippets.

@caike
Created January 22, 2009 15:21
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 caike/50567 to your computer and use it in GitHub Desktop.
Save caike/50567 to your computer and use it in GitHub Desktop.
ActionController::Routing.use_controllers! ["static"]
load "config/routes.rb"
test "should route /riff/some-title" do
assert_routing('/riff/some-foo-bar',
:controller => 'static', :action => 'show_riff', :title => 'some-foo-bar')
end
test "should route /static/new_riff" do
assert_routing('/riffs',
:controller => 'riffs', :action => 'index')
end
test "should route post new riff" do
assert_routing({:method => :post, :path => '/riffs'},
:controller => 'riffs', :action => 'create')
end
test "should route update new riff" do
assert_routing({:method => :put, :path => '/riffs/123'},
:controller => 'riffs', :action => 'update', :id => '123')
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment