Added a new set_cookie matcher to the ActionController matchers #49

sob opened this Issue Aug 3, 2009 · 3 comments


None yet

4 participants

sob commented Aug 3, 2009

Hello -

I've pushed a branch to my fork that implements a set_cookie matcher and associated macros. It's based heavily on the set_the_flash and set_session matchers. My current app utilizes the cacheable-flash plugin which moves the flash messages into a JSON encoded cookie and then clears the flash. This matcher should allow you to match the cookie value on either string or regexp value.


  • sob

I have written a similar matcher myself. I support adding such a matcher to shoulda.


And I wrote one too -- see issue #86. Mine also checks the cookie's expiration time (or lack of one)

gabebw commented Mar 19, 2012


This looks useful - can you file a pull request (with tests, of course) over at shoulda-matchers? That's where all of the "real code" lives now. Shoulda has become just a meta-gem that depends on that code.

-- Gabe

@gabebw gabebw closed this Mar 19, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment