DiUS / pact-consumer-js-dsl

*DEPRECATED* A Javascript DSL for creating pacts, superceded by Pact JS
https://github.com/pact-foundation/pact-js
Other
56 stars 26 forks source link

Updated the example to include the given() method. #34

Closed cwmyers closed 9 years ago

cwmyers commented 9 years ago

As this is demanded by the (at least the jvm) provider so the provider_state will be set.

bethesque commented 9 years ago

This whole example needs re-writing, it's not helpful. I'm not keen on "default server state" because that is effectively no state - there's no good reason to specify that. I'll try and think of something better!

cwmyers commented 9 years ago

I agree Beth, though right now something needs to be specified for the backend to work. The example in question doesn't need any state (which is quite a valid example!), so the question is, in general what if your microservice doesn't require state?

bethesque commented 9 years ago

I've updated it, have another look.

bethesque commented 9 years ago

If you don't require a state, skip the given.

cwmyers commented 9 years ago

But you can’t! It blows up in the pact-jvm if there is no state!

On 2 Mar 2015, at 1:48 pm, Beth Skurrie notifications@github.com wrote:

If you don't require a state, skip the given.

— Reply to this email directly or view it on GitHub https://github.com/DiUS/pact-consumer-js-dsl/pull/34#issuecomment-76651282.

andrewspinks commented 9 years ago

I believe that is a bug in pact-jvm, the ruby implementation doesn't require it.

cwmyers commented 9 years ago

Ahh, that is where the confusion lies. I thought it was a requirement.

On 2 Mar 2015, at 2:07 pm, andrewspinks notifications@github.com wrote:

I believe that is a bug in pact-jvm, the ruby implementation doesn't require it.

— Reply to this email directly or view it on GitHub https://github.com/DiUS/pact-consumer-js-dsl/pull/34#issuecomment-76652593.

cwmyers commented 9 years ago

Looking at the pact-jvm implementation the way tests get run are by changing server state (esp. when using specs2). Would be a bit of an architectural change there.

bethesque commented 9 years ago

Raise a bug with the pact-jvm implementation, the provider state should be optional.

On Mon, Mar 2, 2015 at 2:17 PM, cwmyers notifications@github.com wrote:

Looking at the pact-jvm implementation the way tests get run are but changing server state (esp. when using specs2). Would be a bit of an architectural change there.

— Reply to this email directly or view it on GitHub https://github.com/DiUS/pact-consumer-js-dsl/pull/34#issuecomment-76653211 .

Bethany Skurrie Software Developer

DiUS Computing Pty. Ltd.

where ideas are engineered Phone: +61 3 9008 5400 Mobile: +61 415 413 713

www.dius.com.au

This email is intended solely for the use of the addressee and may contain information that is confidential or privileged. If you receive this email in error please notify the sender and delete the email immediately.