Skip to content

Commit

Permalink
added routing_spec and made first spec pass by adding explicit route …
Browse files Browse the repository at this point in the history
…for design controller
  • Loading branch information
isaackearse committed Dec 6, 2008
1 parent 3414a37 commit f530e58
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/mephisto/routing.rb
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ def self.connect_with(map)
map.connect 'admin/sections/:action/:id', :controller => 'admin/sections'
map.connect 'admin/resources/:action', :controller => 'admin/resources'
map.connect 'admin/templates/:action', :controller => 'admin/templates'

map.connect 'admin/design/:action', :controller => 'admin/design'

map.connect ':controller/:action/:id/:version', :version => nil, :controller => /routing_navigator|account|(admin\/\w+)/, :id => /[^\/]*/

yield if block_given?
Expand Down
9 changes: 9 additions & 0 deletions spec/controllers/routing_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
require File.dirname(__FILE__) + '/../spec_helper'

describe "Admin::DesignController routing" do
controller_name "admin/design"
it "should call the index action at /admin/design" do
params = { :controller => "admin/design", :action => "index" }
params_from(:get, "/admin/design").should == params
end
end

0 comments on commit f530e58

Please sign in to comment.