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

refering ticket #70 #71

Closed
wants to merge 11 commits into from
Closed

refering ticket #70 #71

wants to merge 11 commits into from

Conversation

vpereira
Copy link

It's more like a proof of concept but it works.

now you can do something like:

 ensure_inclusion_of_matcher(:attr).in_array [true,false]

we could implement as well the ensure_exclusion_of_matcher(:attr).in_array []

@@ -48,23 +55,38 @@ def with_high_message(message)
end

def description
"ensure inclusion of #{@attribute} in #{@range.inspect}"
@our_value = @range.nil? ? @array.inspect : @range.inspect
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please move this logic to a method.

@gabebw
Copy link

gabebw commented Mar 16, 2012

Admittedly some of my comments above are sort of nitpicky style stuff.

@vpereira
Copy link
Author

i will fix all of those issues, but not friday night :-))

@vpereira
Copy link
Author

@gabebw I think its everything there :-)

@attilagyorffy
Copy link

+1, I was going to fork this and create a pull request, although i couldn't have done a better job than this methinks. Can we expect this feature in a forthcoming new release some time soon?

Thanks.

@vpereira
Copy link
Author

hi @gabebw everything fine with my commits? I did see that you did try it in a unstable branch.. will you merge it or there is any other missing point?

@gabebw
Copy link

gabebw commented Apr 20, 2012

@vpereira: Thanks! I fixed one thing (the @array.any? meant that if the first value was allowed, the tests would pass even if the second value wasn't allowed). Merged!

@gabebw gabebw closed this Apr 20, 2012
@vpereira
Copy link
Author

\o/

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

3 participants