search for: assert_rout

Displaying 7 results from an estimated 7 matches for "assert_rout".

2011 Apr 21
0
Routing assertions
...match ''admin/categories/:sub_category'' => ''admin#categories'' In rspec ------------------------------------------------------------------------------------------------------------------------------------------------------ For first route assert_routing({:path => "admin/categories"}, {:controller => ''admin'', :action => ''categories''}) For second route assert_recognizes({:controller=>''admin'', :action => ''categories'', :sub_category=&gt...
2006 Mar 26
2
Controllers in modules, not recognised - driving me mad!
...I''ve not changed anything as far as I''m aware. I''m running on OSX using Ruby 1.8.4 and Rails RC1 (but I''ve also tried rolling back to Rails 1.0 and tried Edge Rails) and the problem occurs using lighty, webrick and when I run my functional tests (I have a few assert_routings). I have a Dashboard controller in an admin module. I have the following file: app/controllers/admin/dashboard_controller.rb --- class Admin::DashboardController < ActionController::Base def index # do stuff end end Now, this should be automatically picked up by Rails as http://...
2006 Jan 07
2
Functional tests with routes
Hi all, I''m trying to do a route test using assert_generates and running into a bit of trouble. The controller that I am testing is in a module - class Admin::AdminPortalController def index end end I want the user to jump to the AdminPortal/index action when they use http://myApp/admin, so I''ve put the following in routes.rb map.admin_portal
2006 May 08
0
testing named routes
...> ''index'', :requirements => { :index => /index(artist|date|title)\.html/ }, :index => ''new'' etc... end and my test: opts = { :controller => "films", :action => "index", :index => "indexdate.html" } assert_routing overviews_url(:controller => "films", :index => "indexdate.html"), opts which gives me: 2) Error: test_routes(FilmsControllerTest): NoMethodError: You have a nil object when you didn''t expect it! The error occured while evaluating nil.rewrite /usr/lib/ru...
2006 May 17
0
Strang Behavior when testing Routes
...:version => r2006a, :software => matlab, :platform_filter => "all", :platform => "windows", :id => 1} assert_generates(url, opts) assert_recognizes(opts, url) assert_routing(url, opts) @request.env[''PATH_INFO''] = url post(:download, opts) assert_response(:redirect) assert_template(nil) end [/code] The test passes without failure! However, if I comment out the assert_generates and the assert_recognizes, the test fails. I was un...
2008 Jul 19
1
Routes
Hi there, I''m having an issue with routes I frankly dont get. I have a controller named map which takes in a hash string and converts that to an actual url, works great so localhost:3000/f3gg or whatever works fine now, I have a controller which I want to use to add some records (needs to go through AJAX) I want two strings, from and to but nevermind that for now since I''m too
2006 Apr 26
10
Rails Document must be more detailed otherwise...
In java/c++ the method signature provide a good details on which parameters the method accept, but in rails the ability to send hash as parameters make it impossible to know which parameters can be send. This ability make the rails API doc a must to be full of details and not supply partial examples of usage. When for example I see *link_to_remote*(name, options = {}, html_options = {}) I would