Re: [rspec-users] stale records with integration testing?

2012-02-16 Thread Matt Wynne
On 14 Feb 2012, at 20:44, Justin Ko wrote: > > On Feb 14, 2012, at 9:23 AM, David Chelimsky wrote: > >> On Tue, Feb 14, 2012 at 9:28 AM, Justin Ko wrote: >>> >>> On Feb 13, 2012, at 10:35 PM, David Chelimsky wrote: >>> On Mon, Feb 13, 2012 at 9:04 PM, Justin Ko wrote: > > On F

Re: [rspec-users] Such a simple test fails. But why ?

2012-02-16 Thread Serguei Cambour
I found why and shame on me :(((. The array variable 'argv' was passed by reference into the Options class and was modified there by 'parse' method. That's why, when returned back to the testing code, the array was nil. -- Posted via http://www.ruby-forum.com/. ___

[rspec-users] How to set cookies before request spec?

2012-02-16 Thread Meltemi
I can't seem to figure out how to set a cookie for a Request spec? Tried: before(:each) do @user = Fabricate(:user) request.cookies[:id_token] = @user.id end but that gives a NoMethodError errors: undefined method `cookies' for nil:NilClass How does one run request specs when cookies need

Re: [rspec-users] stale records with integration testing?

2012-02-16 Thread David Chelimsky
On Thu, Feb 16, 2012 at 4:17 AM, Matt Wynne wrote: > > On 14 Feb 2012, at 20:44, Justin Ko wrote: > > > On Feb 14, 2012, at 9:23 AM, David Chelimsky wrote: > > On Tue, Feb 14, 2012 at 9:28 AM, Justin Ko wrote: > > > On Feb 13, 2012, at 10:35 PM, David Chelimsky wrote: > > > On Mon, Feb 13, 2012 a

Re: [rspec-users] How to set cookies before request spec?

2012-02-16 Thread David Chelimsky
On Wed, Feb 15, 2012 at 8:36 PM, Meltemi wrote: > I can't seem to figure out how to set a cookie for a Request spec?  Tried: > > before(:each) do >   @user = Fabricate(:user) >   request.cookies[:id_token] = @user.id > end > > but that gives a NoMethodError errors: undefined method `cookies' for >

Re: [rspec-users] How to set cookies before request spec?

2012-02-16 Thread George Dinwiddie
Meltemi, On 2/15/12 9:36 PM, Meltemi wrote: I can't seem to figure out how to set a cookie for a Request spec? Tried: before(:each) do @user = Fabricate(:user) request.cookies[:id_token] = @user.id end but that gives a NoMethodError errors: undefined method `cookies' for nil:NilClass In that