Skip to content
This repository has been archived by the owner on Dec 5, 2019. It is now read-only.

contracts.validate_all yields NoMethodError #174

Open
krobi64 opened this issue Mar 18, 2015 · 2 comments
Open

contracts.validate_all yields NoMethodError #174

krobi64 opened this issue Mar 18, 2015 · 2 comments

Comments

@krobi64
Copy link

krobi64 commented Mar 18, 2015

Hi guys,

I love the premise of this library. I want to first thank you for your effort to put something like this together. My company is standardizing on json-schema4. I've generated contracts that pass validation of the formatting and am trying to replicate the provider-side testing.

I am following the documentation samples which shows the following for 'Testing providers by simulating consumers' (running this in irb):

require 'pacto'

contracts = Pacto.load_contracts('contracts', 'https://api.github.com')
contracts.validate_all

This returns the following error:

NoMethodError: undefined method `validate_all' for #<Pacto::ContractSet:0x007f91d694a4c0>

I look at the code for ContractSet, and sure enough, there is not a validate_all method. In fact, grepping the entire project does not yield any reference to validate_all

What is the correct method for running validations for providers?

Thanks!

[EDIT]: I found the simulate_consumers method in ContractSet and am proceeding from here. The documentation should be updated, I will see if I can find it an submit a PR.

@brunofracalossi
Copy link

I guess that you can validate them using contracts.simulate_consumers

@krobi64
Copy link
Author

krobi64 commented Sep 10, 2015

yes

Kris Robison | Principal Engineer

cell. 408.390.8107
email. kris.robison@oracle.com http://bluekai.com/
20883 Stevens Creek Blvd, Suite 200 Cupertino, CA 95014

On Sep 10, 2015, at 6:39 AM, brunofracalossi notifications@github.com wrote:

I guess that you can validate them using contracts.simulate_consumers


Reply to this email directly or view it on GitHub #174 (comment).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants