Re: [rspec-users] undefined method `route_for' for #

2010-08-30 Thread David Chelimsky
On Aug 30, 2010, at 9:36 AM, sleepwalker wrote: > Hello, all, I have this error with my rspec - controller - test, and > yes, I do found the thread with the same error here, but it isn't > helped me, think it's not my case. > > i have rails -v = Rails 3.0.0.rc, rspec -v = 2.0.0.beta.18 (hope the

Re: [rspec-users] undefined method `route_for

2009-12-24 Thread Amit Kulkarni
Yes,Thanks a lot Andrew. The last two lines were not commented in routes.rb because of that it was matching default.Now i commented out those line and it was catching if undefined routes are given. -- Posted via http://www.ruby-forum.com/. ___ rspec-use

Re: [rspec-users] undefined method `route_for

2009-12-14 Thread Andrew Premdas
2009/12/14 Amit Kulkarni > Thanks David. > Also i am little bit confused regarding routes. > > Consider a routing example > > it "should map { :controller => 'channels', :action => 'new' } to > /channels/new" do > route_for(:controller => "channels", :action => "new").should == > "/channels/new"

Re: [rspec-users] undefined method `route_for

2009-12-13 Thread Amit Kulkarni
Thanks David. Also i am little bit confused regarding routes. Consider a routing example it "should map { :controller => 'channels', :action => 'new' } to /channels/new" do route_for(:controller => "channels", :action => "new").should == "/channels/new" end Now i can see all the routing meth

Re: [rspec-users] undefined method `route_for

2009-12-07 Thread David Chelimsky
On Mon, Dec 7, 2009 at 5:32 AM, Amit Kulkarni wrote: > Hi David, > I have some query regarding running spec command. > When i tried to run normal testcase by command "spec > test_controller_spec.rb" > then that particular test case runs but the routing testcase fails. > > Now if i run through the

Re: [rspec-users] undefined method `route_for

2009-12-07 Thread Amit Kulkarni
Hi David, I have some query regarding running spec command. When i tried to run normal testcase by command "spec test_controller_spec.rb" then that particular test case runs but the routing testcase fails. Now if i run through the command "spec spec/controllers/test_controller_spec.rb" then all

Re: [rspec-users] undefined method `route_for

2009-11-26 Thread David Chelimsky
On Thu, Nov 26, 2009 at 1:21 AM, Amit Kulkarni wrote: > Amit Kulkarni wrote: > > Ok Fine.That sounds to be a good idea. > > Thanks > > Hi David, > Good news,My routing scenarios are working now. > I dont know how but it did.I was going to mail you the app but it is > working fine now. > > Excelle

Re: [rspec-users] undefined method `route_for

2009-11-25 Thread Amit Kulkarni
Amit Kulkarni wrote: > Ok Fine.That sounds to be a good idea. > Thanks Hi David, Good news,My routing scenarios are working now. I dont know how but it did.I was going to mail you the app but it is working fine now. -- Posted via http://www.ruby-forum.com/. __

Re: [rspec-users] undefined method `route_for

2009-11-17 Thread Amit Kulkarni
Ok Fine.That sounds to be a good idea. Thanks -- Posted via http://www.ruby-forum.com/. ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

Re: [rspec-users] undefined method `route_for

2009-11-17 Thread David Chelimsky
On Tue, Nov 17, 2009 at 4:53 AM, Amit Kulkarni wrote: > Amit Kulkarni wrote: > > Oh that means if i am using rails version 2.1.2 or more then i need to > > have rspec version 1.1.12. > > In that case i need to remove the latest version and install rspec > > 1.1.12. > > I will do it and update you

Re: [rspec-users] undefined method `route_for

2009-11-17 Thread Amit Kulkarni
Amit Kulkarni wrote: > Oh that means if i am using rails version 2.1.2 or more then i need to > have rspec version 1.1.12. > In that case i need to remove the latest version and install rspec > 1.1.12. > I will do it and update you asap. > Thanks a lot David. Hi David, As per the doc i updated m

Re: [rspec-users] undefined method `route_for

2009-11-15 Thread Amit Kulkarni
Oh that means if i am using rails version 2.1.2 or more then i need to have rspec version 1.1.12. In that case i need to remove the latest version and install rspec 1.1.12. I will do it and update you asap. Thanks a lot David. -- Posted via http://www.ruby-forum.com/. ___

Re: [rspec-users] undefined method `route_for

2009-11-13 Thread David Chelimsky
On Fri, Nov 13, 2009 at 2:28 AM, Amit Kulkarni wrote: > MY spec helper contains following code: > # This file is copied to ~/spec when you run 'ruby script/generate > rspec' > # from the project root directory. > ENV["RAILS_ENV"] ||= 'test' > require > > File.expand_path(File.join(File.dirname(__

Re: [rspec-users] undefined method `route_for

2009-11-13 Thread Amit Kulkarni
MY spec helper contains following code: # This file is copied to ~/spec when you run 'ruby script/generate rspec' # from the project root directory. ENV["RAILS_ENV"] ||= 'test' require File.expand_path(File.join(File.dirname(__FILE__),'..','config','environment')) require 'spec' require 'webrat'

Re: [rspec-users] undefined method `route_for

2009-11-12 Thread David Chelimsky
On Thu, Nov 12, 2009 at 11:32 PM, Amit Kulkarni wrote: > David Chelimsky wrote: > > On Wed, Nov 11, 2009 at 11:19 PM, Amit Kulkarni > > wrote: > > > >> >> > >> It gets executed but i am not able to see any results as in 2 examples 2 > >> passed something like that as it comes normally. > >> > > >

Re: [rspec-users] undefined method `route_for

2009-11-12 Thread Amit Kulkarni
David Chelimsky wrote: > On Wed, Nov 11, 2009 at 11:19 PM, Amit Kulkarni > wrote: > >> >> >> It gets executed but i am not able to see any results as in 2 examples 2 >> passed something like that as it comes normally. >> > > Then how do you know it gets executed? I dont know,When i run the comm

Re: [rspec-users] undefined method `route_for

2009-11-12 Thread David Chelimsky
On Wed, Nov 11, 2009 at 11:19 PM, Amit Kulkarni wrote: > David Chelimsky wrote: > > On Nov 11, 2009, at 5:58 AM, Amit Kulkarni wrote: > > > >> > >>it "should map { :controller => 'home' } RESTfully" do > >> params_from( :get, '/home' ).should == { :controller => 'home', > >> :action => '

Re: [rspec-users] undefined method `route_for

2009-11-11 Thread Amit Kulkarni
David Chelimsky wrote: > On Nov 11, 2009, at 5:58 AM, Amit Kulkarni wrote: > >> >>it "should map { :controller => 'home' } RESTfully" do >> params_from( :get, '/home' ).should == { :controller => 'home', >> :action => 'index' } >>end >> end >> end >> >> I am using "spec home_control

Re: [rspec-users] undefined method `route_for

2009-11-11 Thread David Chelimsky
On Nov 11, 2009, at 5:58 AM, Amit Kulkarni wrote: Hi David still no success. require File.expand_path(File.dirname(__FILE__) + '/../spec_helper') describe HomeController, "routes" do describe "route generation" do it "should map { :controller => 'home', :action => 'index' } to / home" do

Re: [rspec-users] undefined method `route_for

2009-11-11 Thread Amit Kulkarni
Hi David still no success. require File.expand_path(File.dirname(__FILE__) + '/../spec_helper') describe HomeController, "routes" do describe "route generation" do it "should map { :controller => 'home', :action => 'index' } to /home" do route_for(:controller => 'home', :action => 'index

Re: [rspec-users] undefined method `route_for

2009-11-11 Thread David Chelimsky
On Wed, Nov 11, 2009 at 1:42 AM, Amit Kulkarni wrote: > Thanks David for the information but still i am getting the same error. > What i have done is: > I have home controller. > now i am writing route scenarios in home_controller_spec.rb which is > under spec/controllers directory > > I tried yo

Re: [rspec-users] undefined method `route_for

2009-11-11 Thread Amit Kulkarni
Thanks David for the information but still i am getting the same error. What i have done is: I have home controller. now i am writing route scenarios in home_controller_spec.rb which is under spec/controllers directory I tried your code which looks like as describe "route generation", :type => :

Re: [rspec-users] undefined method `route_for

2009-11-10 Thread David Chelimsky
On Tue, Nov 10, 2009 at 4:44 AM, Amit Kulkarni wrote: > Hi all, > I am writing scenarios for testing my routes but it is giving me error > as undefined method `route_for and also for params_from. > Did i miss something which i need to add in my controller > > My code is as follows: > > require Fi