Added a new set_cookie matcher to the ActionController matchers #49

Closed
sob opened this Issue Aug 3, 2009 · 3 comments

Projects

None yet

4 participants

@sob
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.

http://github.com/sob/shoulda/tree/add_set_cookie_matcher

Thanks,

  • sob
@wvanbergen

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

@rnewman57

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

@gabebw
Member
gabebw commented Mar 19, 2012

Hi!

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