Hey gang,
I’m writing a story in which I update a model via XML. So far, so
good. But, I want to test the outcome of the controller, namely the
following code:
format.xml { head :ok }
How can I test this in a story?
thanks,
bartz
Hey gang,
I’m writing a story in which I update a model via XML. So far, so
good. But, I want to test the outcome of the controller, namely the
following code:
format.xml { head :ok }
How can I test this in a story?
thanks,
bartz
On Thu, Mar 27, 2008 at 7:08 AM, Bart Z. [email protected]
wrote:
Hey gang,
I’m writing a story in which I update a model via XML. So far, so
good. But, I want to test the outcome of the controller, namely the
following code:format.xml { head :ok }
How can I test this in a story?
Same as in a controller example:
response.should be_success
response.body.should == “”
Cheers,
David
On Thu, Mar 27, 2008 at 8:50 AM, David C. [email protected]
wrote:
Same as in a controller example:
response.should be_success
response.body.should == “”
Or - for the latter …
response.should be_blank
Just a matter of preference, but perhaps that’s more readable.
On 27 mrt 2008, at 13:53, David C. wrote:
format.xml { head :ok }
response.should be_blankJust a matter of preference, but perhaps that’s more readable.
Thanks.
I was hoping for a specific test of the head :ok, but this’ll do more
than fine :).
gr,
bartz
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs