Kelly FelkinsKelly Felkins
Standup 3/26/2009: Testing Request Headers When Request Object Is Frozen
edit Posted by Kelly Felkins on Thursday March 26, 2009 at 04:59PM

Ask for Help

"How do you test request headers? The request object is frozen..."

The team is using rspec to test an OAuth implementation and needs better access to the request object.

  • Possibly modify the request environment prior to running the test -or-
  • Instantiate a new, non-frozen request object.

Comments

  1. R. Potter R. Potter on March 27, 2009 at 08:10PM

    dup the object. It's closer to the real situation than your first option. It's very close to the second option but, it ensure that you get a testable object with what should have the same internal state as the original.

    --R