flapjack / flapjack-diner

Consumer of the Flapjack API
http://flapjack.io/
MIT License
17 stars 10 forks source link

Refactoring validations #7

Closed skorfmann closed 12 years ago

skorfmann commented 12 years ago

I was a little bit bored tonight, so I started to refactor the validation part in the proposed way #6. I think it turned out to be better than I've anticipated. Probably I will add some more specs over the weekend.

Now it is possible to have global validations, while it is still possible to overwrite the validations on request level.

Would be happy about feedback.

ghost commented 12 years ago

Looks good, and it's a much nicer and more expressive syntax. I guess I can probably simplify the main flapjack-diner spec file to stub responses from the validator for success/failure for each operation...