Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RMQ::Validation.add_validator method + spec #108

Merged
merged 2 commits into from
Sep 11, 2014

Conversation

vaughankg
Copy link
Contributor

A start to #106

Edge cases and things to think about:

  • How to handle an error in the users validation block.
  • How to handle no block given.
  • @@validation_methods[rule] in this implementation will be a non-Lambda Proc whereas all the others will be Lambdas

@GantMan
Copy link
Member

GantMan commented Sep 10, 2014

Looks awesome!

I think when no block is given, we should raise an exception. Can you add that in real quick?
raise(ArgumentError, "add_validator requires a block") if block.nil?

Then when tests pass we can merge :)

@vaughankg
Copy link
Contributor Author

Done

GantMan added a commit that referenced this pull request Sep 11, 2014
RMQ::Validation.add_validator method + spec
@GantMan GantMan merged commit acc37a7 into infinitered:master Sep 11, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants