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] Un-recognised routes that do exist, using namespaces & subdomain checking

2009-11-11 Thread DEfusion
Hi David, Yeah I had used the new style in the past and got the same issue, I just accidentally reverted to the old style. Anyway changing to the new style using route_to as suggested doesn't resolve the issue, the same 2 routes give the same error, but the telling thing is the failure message sh

Re: [rspec-users] Un-recognised routes that do exist, using namespaces & subdomain checking

2009-11-11 Thread David Chelimsky
On Wed, Nov 11, 2009 at 3:12 AM, DEfusion wrote: > Hi David, > > Yeah I had used the new style in the past and got the same issue, I > just accidentally reverted to the old style. > > Anyway changing to the new style using route_to as suggested doesn't > resolve the issue, the same 2 routes give

Re: [rspec-users] Un-recognised routes that do exist, using namespaces & subdomain checking

2009-11-11 Thread David Chelimsky
On Wed, Nov 11, 2009 at 4:54 AM, David Chelimsky wrote: > On Wed, Nov 11, 2009 at 3:12 AM, DEfusion wrote: > >> Hi David, >> >> Yeah I had used the new style in the past and got the same issue, I >> just accidentally reverted to the old style. >> >> Anyway changing to the new style using route_to

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
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] Display Rspec output in an html file

2009-11-11 Thread Amit Kulkarni
Any suggestions on the above topic -- 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] Model spec for file upload with paperclip and fastercsv

2009-11-11 Thread Ray K.
Now I have another weird error. My Products doesn't save in the specs, but it does in cucumber tests and human tests. I'd be glad if someone could look into this. http://pastie.org/693611 Ray -- Posted via http://www.ruby-forum.com/. ___ rspec-users m

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] Model spec for file upload with paperclip and fastercsv

2009-11-11 Thread Zach Dennis
In the example that is failing, "should build 3 new Products" you have: it "should build 3 new Products" do # I have to tag this pending, this results in a weird error I don't have time for yet # full stack testing with cucumber succeeds, human testing does too # pend

Re: [rspec-users] Model spec for file upload with paperclip and fastercsv

2009-11-11 Thread Ray K.
Thanks for your input, I will try that later. The reason why I posted here is, that it felt all wrong to spec my model like this while writing it. It just wasn't behavior driven, but implementation driven. Ray -- Posted via http://www.ruby-forum.com/. __

Re: [rspec-users] Model spec for file upload with paperclip and fastercsv

2009-11-11 Thread Ray K.
Here's a conclusion I'm drawing for myself. With little prior experience, there's only so much I could take with me from one read through the rspec book. Maybe it's time to read it again. -- Posted via http://www.ruby-forum.com/. ___ rspec-users mailin

[rspec-users] Returning a StringIO object from a stub

2009-11-11 Thread JGailor
I'm trying to stub File.new so I can return a StringIO object from it to set some expectation and make sure the subject under test is behaving correctly, but calling readline() on the StringIO object in the subject always returns nil. What's strange is that calling read() returns the entire set of

Re: [rspec-users] Returning a StringIO object from a stub

2009-11-11 Thread Paul Hinze
JGailor on 2009-11-11 at 16:11: > I'm trying to stub File.new so I can return a StringIO object from it > to set some expectation and make sure the subject under test is > behaving correctly, but calling readline() on the StringIO object in > the subject always returns nil. > > data = <<-DATA >

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