similar to: Testing route with proc --- possible and how?

Displaying 20 results from an estimated 2000 matches similar to: "Testing route with proc --- possible and how?"

2008 Jun 25
0
Rspec routing_spec failing on nested singular resource
This should be easy to solve; I''m trying to get an Rspec routing_spec working with a singular nested resource; map.resources :users do |user| user.resource :profile end All the tests in the profile_routing_spec seem to be failing because they can''t match the routes, for example; # The spec describe ProfileController do describe "route generation" do it
2011 Jun 21
0
Status of Rails.application.routes.recognize_path()
This might be more a question for the guys in the "Ruby on Rails: Core" group, but I''ll try it out here first... So, while writing a gem (engine) for rails, I found that I needed to have my app (in a pre-filter) directly query the router. In the "old" days, this was done using ActionController::Routing::Routes.recognize_path(). My 2nd edition of "Agile Web
2009 Nov 10
10
Un-recognised routes that do exist, using namespaces & subdomain checking
I''m getting really cheesed off with RSpec not matching some of my routes when controller testing when I have subdomain checking (courtesy of subdomain-fu) on namespaces. These routes appear in the rake routes output, and work fine via HTTP requests . The really annoying thing is it''s working fine for routes that aren''t at the root of the namespace. E.g. say I have
2009 Mar 06
2
Routes.recognize_path on more complicated Routes
For a permissions system i''m writing i''m extending the standard link_to helpers to check if a user has a permission to perform that action before displaying a link to clean-up my code so i don''t have to put if checks all over them. I''m trying to use.. ActionController::Routing::Routes.recognize_path(url, :method => method) to get the action and controller
2006 Oct 03
0
rs.recognize_path "/home" is not working in script/console
My application runs fine. I just want to change a few routing rules and I decided to test using script/console. But I''m getting following error. Loading development environment. >> rs = ActionController::Routing::Routes >> rs.recognize_path "/home/index" TypeError: can''t convert Fixnum into String from
2011 Jun 22
3
Status of Rails.application.routes.recognize_path()
Sorry if this question isn''t really "Ruby on Rails: Core" material. I feel it is, at least kind-of (also, I first tried asking in "Ruby on Rails: Talk" to no avail.). So, while writing a gem (engine) for rails, I found that I needed to have my app (in a pre-filter) directly query the router. In the "old" days, this was done using
2010 Jun 20
7
rspec-rails 2.0.0.beta.12 showing undefined method error for route_to
First of all, I''ve been trying to find an answer for this problem all over the internet without luck. The thing is that I am using RVM with ruby 1.9.2-head and I created a new empty gemset. Then I installed bundler gem with: gem bundler install That installed the library into the /Users/damselem/.rvm/gems/ ruby-1.9.2-head at rails3/gems directory. Then I went to my rails 3 app
2009 May 01
4
Can't get to an action in a RESTful controller
Folks, I am using the restful_authentication plugin. This creates the users controller which is declared as a resource in routes.rb as below map.resources :users Now in the UsersController I have created an action to resetpwd that I am trying to get to from the login page when the user clicks "forgot password". However, when I do that the log file tells me that the call to
2007 Feb 10
3
recognize_path discrepency
hey all - wondering if someone would relive my confusion... given a model called say Meeting and a route as "map.resources :meetings" in the console: >>r=ActionController::Routing::Routes >>r.recognize_paths "/meetings" =>{:action="index",:controller=>"meetings"} all works as I expect, but if I do >>r.recognize_paths
2007 Dec 28
1
Getting wrong route - fairly complete error description
OK, I have a routing problem, that seems to be working in the console, but not in the app. I have people that have nested tasks, like so: ------------------------------- # routes.rb map.resources :people do |person| person.resources :phone_notes person.resources :documents person.resources :tasks, :member => {:complete => :put} end map.resources :tasks, :member => {:complete =>
2006 Jul 05
1
Routing error "unitialized constant" after refactoring
Hi. I''ve heavily refactored an application. When I access http://0.0.0.0:3000/ I now get the stack trace at the end of this mail. My routes.rb: ActionController::Routing::Routes.draw do |map| map.connect '''', :controller => ''user/dashboard'', :action => ''boo'' map.connect '':controller/:action/:id'',
2006 Apr 21
0
Troubleshooting recognition failures?
How does one go about troubleshooting a "Routing Error" "Recognition failure"? I''ve used the Webrick log to get down to a "recognize_path(path)" call in /actionpack-1.12.1/lib/action_controller/routing.rb and put a logger.debug path there, but that just told me what I already knew, and the definition of "recognize_path" looks like its
2006 Aug 14
0
Recognition failed for ...
Hello, I''m new to Rails so please forgive me if I''m asking any stupid questions... I''m trying to set up lighttpd so that is supports multiple Rails apps (in the form of http://server/app1, http://server/app2, etc). OS: Gentoo, 2.6.17 kernel, ruby 1.8.4, rails 1.1.6, lighttpd 1.4.11 My rails app is generated into /mnt/b/www/rails/test1/ and I''ve appended
2009 Oct 06
3
rspec-rails 1.2.9 Released
rspec-rails version 1.2.9 has been released! * <http://rspec.info> * <http://rubyforge.org/projects/rspec> * <http://github.com/dchelimsky/rspec-rails> * <http://wiki.github.com/dchelimsky/rspec/rails> * <rspec-devel at rubyforge.org> Behaviour Driven Development for Ruby on Rails. Changes: ### Version 1.2.9 / 2009-10-05 * enhancements * added route_to and
2007 Sep 16
2
Problem with recognize_path
Hello, I am experiencing a weird problem on one of the 3 test servers I''m using: There is a controller named admin/statistics and I am trying to access /admin/statistics The matching rule is: map.connect '':controller/:action/:id'' On 2 of the 3 servers, recognize_path correctly matches to Parameters: {"action"=>"index",
2013 Jan 27
0
[next] webgen 1.0.0.beta3
Hey everybody, I have pushed the latest changes to the Github repository and released the third beta version of webgen! A generated version of the new webgen homepage is now also available at http://webgen.rubyforge.org/beta-doc/ Note that nearly all of the links to the reference documentation are still missing. However, you will get a directory listing showing the available page under a
2012 Jul 12
0
Set requests' header inside spec/routing
I''m working on a Rails application having a REST API in JSON format and versioned (according to this excellent Ryan''s cast: http://railscasts.com/episodes/350-rest-api-versioning). For instance, there is a spec/requests spec: require ''spec_helper'' describe "My Friends" do describe "GET /my/friends.json" do it "should get
2011 Apr 13
0
RSpec Routing Error: Expected block to return true value.
I''m doing some tests with rspec on a rails app and I have a setup where I''d like to match a URL like this: /search/users/name/servername To controller => search, action => users, with params of name and server. The issue is that I want to make sure people can just enter a name, without a server name at the end. Looking at the default comments in routes.rb, it''s
2006 Feb 22
7
Ruby on Rails with Apache2, MS SQL on Windows XP
My app was running fine with Linux, Apache2/Lighttpd and MySQL. I have a need to migrate to Windows, Apache2 and MS SQL. But I keep getting the following error when I load the initial home page. Anyone can please give me a pointer where to go next for troubleshooting? Thanks in advance. NameError in <controller not set>#<action not set> uninitialized constant
2008 Feb 01
1
Rails routing and active scaffold fight to the death
Just kidding, it''s not as bad as it seems. Right now I don''t have much in my route.rb, and I''m getting this in my console: Processing ApplicationController#index (for 127.0.0.1 at 2008-02-01 14:54:00) [GET] [2008-02-01 14:54:00] (552) INFO Session ID: a8eeb58764d872bbd1fdb337636e68e7 [2008-02-01 14:54:00] (552) INFO Parameters: {} [2008-02-01 14:54:00] (552)