Hello everyone,
Someone I was pairing with this evening needed this for one of their
projects, so I've added matchers for headers to rspec-http and pushed
an updated gem. You can now do
response.should have_header('Content-Type')
response.should have_header('Content-Type' => 'application/json
> But a sophisticated test will make decisions in mid test.
Quis custodiet ipsos custodes? You'll need to write specs for the
logic in your specs then.
Best,
Sidu.
http://c42.in
http://blog.sidu.in
On 10 August 2011 04:53, Mike Jr wrote:
> As I understand it, RSpec runs in two passes. The first
On Wed, Aug 10, 2011 at 2:23 AM, Mike Jr wrote:
> But a sophisticated test will make decisions in mid test. If a
> certain test condition occurs, set a singleton hash and then have
> later tests condition their processing on that hash. In my tests,
> these if statements are within the it blocks
>
> RSpec is built around the premise that each example is run in its own
> environment, and that one should not depend on the outcome of another. This
> is not unique to RSpec, btw. It's how all of the unit testing frameworks of
> which I am aware work.
>
I know I'm going off-topic, but TestNG su