[rspec-users] Testing cookies

Olivier Dupuis odupuis at uottawa.ca
Wed Nov 28 13:52:08 EST 2007


Hello,

 

Here's a test I wrote for cookies:

 

it "should change language when params[:id] is present" do

  cookies[:thothle_language] = 'e'

  get 'index', :id => 'f'

  response.cookies["thothle_language"].should equal('f')

end

 

The error I get is the following:

 

...expected "f", got ["f"] (using .equal?)

 

Any help would be appreciated.

 

Thank you

 

Olivier Dupuis

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/rspec-users/attachments/20071128/63f7e63b/attachment.html 


More information about the rspec-users mailing list