Skip to content

Instantly share code, notes, and snippets.

@caike

caike/gist:50567

Created Jan 22, 2009
Embed
What would you like to do?
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