search for: test_route

Displaying 6 results from an estimated 6 matches for "test_route".

2006 May 18
6
Routes and Testing Routes
...s the :software portion of the url like this--params[:software] If any of the above steps do not match, the route is skipped, the keys are cleared and the process is repeated with the next route. So now I want to test my route with within the User::VersionControllerTest class: [code] def test_route url = "/all/eudora/7.0.1/windows|download/5" opts = {:controller => ''user/version'', latform_filter => "all", :software => "eudora", :version => "7.0.1", latform => "windows", :distribution_...
2006 May 09
1
name_url in tests
...URL rewriting tests. dorian Test: # named routes opts = { :action => "dotest", :test => "test1" } assert_recognizes opts, taste_url(:action => "dotest", :test => "test1") Error ( I have a route named ''taste''): test_routes(FilmsControllerTest): NoMethodError: You have a nil object when you didn''t expect it! The error occured while evaluating nil.rewrite /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/base.rb:461:in `url_for'' generated/routing/named_routes/taste.rb:2:in `...
2006 May 08
0
testing named routes
...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/ruby/gems/1.8/gems/actionpack-1.12.0/lib/action_controller/base.rb:459:in `url_for'' generated/routing/named_routes/overviews.rb:2:...
2006 Jan 21
2
Testing ActiveRecord associations
How do I write a test which proves something like "Post :has_many Comments" and "Comment :belongs_to Post"? It doesn''t seem to be covered in "A Guide to Testing the Rails" on manuals.rubyonrails.com. Cheers, Robert. -- Posted via http://www.ruby-forum.com/.
2006 May 18
2
Help with Routes
...access the :software portion of the url like this--params[:software] If any of the above steps do not match, the route is skipped, the keys are cleared and the process is repeated with the next route. So now I want to test my route with within the User::VersionControllerTest class: [code] def test_route url = "/all/eudora/7.0.1/windows/download/5" opts = {:controller => ''user/version'', latform_filter => "all", :software => "eudora", :version => "7.0.1", latform => "windows", :distribution_...
2006 Apr 22
5
selenium plugin not working with rails 1.1
Hi, I really like selenium, and I just tried the plugin created Jonas Bengtsson. However I cannot get it to run on rails 1.1 and coundn''t find anyone complaining about it? Did anyone get it to run on rails 1.1.2? Greets, Abdur-Rahman