Re: [rspec-users] specifying an HTTP status code

2007-12-01 Thread Scott Taylor
On Dec 1, 2007, at 5:10 PM, Jarkko Laine wrote: > On 1.12.2007, at 23.27, Scott Taylor wrote: >> it "should return an HTTP status code of 404" do >>get :view >>response.headers["Status"].should == "404 Not Found" > > or > > response.response_code.should == 404 > Nice. I find out someth

Re: [rspec-users] specifying an HTTP status code

2007-12-01 Thread Jarkko Laine
On 1.12.2007, at 23.27, Scott Taylor wrote: > it "should return an HTTP status code of 404" do >get :view >response.headers["Status"].should == "404 Not Found" or response.response_code.should == 404 -- Jarkko Laine http://jlaine.net http://dotherightthing.com http://www.railsecommerce.

Re: [rspec-users] specifying an HTTP status code

2007-12-01 Thread David Chelimsky
On Dec 1, 2007 4:27 PM, Scott Taylor <[EMAIL PROTECTED]> wrote: > > On Dec 1, 2007, at 3:45 PM, Francis Hwang wrote: > > > Hi all, > > > > I'm just starting to work w/ RSpec, so I hope this question isn't too > > obvious or missing the point somehow: Is there a way in RSpec to > > specify that a co

Re: [rspec-users] specifying an HTTP status code

2007-12-01 Thread Scott Taylor
On Dec 1, 2007, at 3:45 PM, Francis Hwang wrote: > Hi all, > > I'm just starting to work w/ RSpec, so I hope this question isn't too > obvious or missing the point somehow: Is there a way in RSpec to > specify that a controller action should use a specific HTTP status > code? Specifically I want

[rspec-users] specifying an HTTP status code

2007-12-01 Thread Francis Hwang
Hi all, I'm just starting to work w/ RSpec, so I hope this question isn't too obvious or missing the point somehow: Is there a way in RSpec to specify that a controller action should use a specific HTTP status code? Specifically I want to test for the usage of 301 as opposed to 302, for a

[rspec-users] mock feed

2007-12-01 Thread Sahyoun
Hello generous coders, I'm having difficulty getting a couple of tests to pass. I have an address model which takes an address and with a callback on save and update passes the address to google's geocoding service. The returned XML is parsed and saved to the address object: protected def g