The Artima Developer Community
Sponsored Link

Ruby Buzz Forum
Testing Cookies in Ruby on Rails

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Robby Russell

Posts: 981
Nickname: matchboy
Registered: Apr, 2005

Robby Russell is the Founder & Executive Director PLANET ARGON, a Ruby on Rails development firm
Testing Cookies in Ruby on Rails Posted: Aug 28, 2006 7:05 AM
Reply to this message Reply

This post originated from an RSS feed registered with Ruby Buzz by Robby Russell.
Original Post: Testing Cookies in Ruby on Rails
Feed Title: Robby on Rails
Feed URL: http://feeds.feedburner.com/RobbyOnRails
Feed Description: Ruby on Rails development, consulting, and hosting from the trenches...
Latest Ruby Buzz Posts
Latest Ruby Buzz Posts by Robby Russell
Latest Posts From Robby on Rails

Advertisement

Over the weekend, Brian Ford released a useful plugin for testing your Ruby on Rails applications called, assert_cookie.

To use assert_cookie, follow these steps.

  1. Install via, script/plugin install http://svn.planetargon.org/rails/plugins/assert_cookie
  2. Fill your tests with some cookies
  3. Test your cookies!
Here are a few examples that Brian posted.

  assert_cookie :pass, 
      :value => lambda { |value| UUID.parse(value).valid? }
  assert_cookie :yellow, :value => ['sunny', 'days']
  assert_cookie :delight, :value => 'yum'
  assert_cookie :secret, :path => lambda { |path| path =~ /secret/ }, 
      :secure => true

For more information on other plugins and tools that PLANET ARGON is releasing under open source licenses, visit www.planetargon.org.

Have Fun!

Read: Testing Cookies in Ruby on Rails

Topic: Dialogue-Driven Development is about Listening Previous Topic   Next Topic Topic: Is Your Test Suite Acceptable?

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use