Permalink
Browse files

Fixed the route builder

  • Loading branch information...
jferris committed Feb 5, 2009
1 parent 0a2f012 commit 882349634c4a629e3a9ca57a1cafe77aee34ef5d
Showing with 3 additions and 2 deletions.
  1. +3 −2 test/model_builder.rb
View
@@ -58,14 +58,15 @@ def define_routes(&block)
ActionController::Routing.const_set('Routes', new_routes)
end
new_routes.draw(&block)
- new_routes.load!
end
def build_response(&block)
klass = define_controller('Examples')
block ||= lambda { render :nothing => true }
klass.class_eval { define_method(:example, &block) }
- define_routes {|map| map.resources :examples }
+ define_routes do |map|
+ map.connect 'examples', :controller => 'examples', :action => 'example'
+ end
@controller = klass.new
@request = ActionController::TestRequest.new

0 comments on commit 8823496

Please sign in to comment.