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

Enhance AllowValueMatcher to take multiple arguments #80

Closed
wants to merge 4 commits into from
Closed

Enhance AllowValueMatcher to take multiple arguments #80

wants to merge 4 commits into from

Commits on Sep 5, 2010

  1. Copy the full SHA
    e906b16 View commit details
    Browse the repository at this point in the history
  2. Copy the full SHA
    f0fdeb1 View commit details
    Browse the repository at this point in the history
  3. allow multiple values for AllowValueMatcher

    With the deprecation of "should_allow_values_for" there is currently no clean
    way to specify multiple allowed (or forbidden) values for an attribute in a
    single assertion. This can make test cases unnecessarily verbose.
    
    This patch gives AllowValueMatcher the ability to take multiple values. The new
    matcher is fully downward compatible (i.e. given a single argument it behaves
    identically to the old matcher).
    
    This matcher will stop checking for bad values when the first bad value is
    encountered.
    sigi committed Sep 5, 2010
    Copy the full SHA
    a08b3bf View commit details
    Browse the repository at this point in the history

Commits on Mar 19, 2012

  1. Merge remote-tracking branch 'shoulda/enhance_allow_value_matcher' in…

    …to shoulda-matchers
    
    In this merge, we also adjust the spec to RSpec syntax.
    
    Conflicts:
    	spec/shoulda/active_model/allow_value_matcher_spec.rb
    sigi committed Mar 19, 2012
    Copy the full SHA
    676b394 View commit details
    Browse the repository at this point in the history