ValidateFormatOfMatcher#not_with renamed to #without #192

Closed
wants to merge 1 commit into from

3 participants

@fernandors87

Hello Sirs,

As discussed in #178, I renamed the method #not_with to #without.

  • The #not_with now calls #without
  • Deprecation comment added to #not_with
  • Tests and examples in comments updated to use #without
@Umofomia

I took a look at the original discussion at #178, but in this case, without does not mean the same thing as not with. When you write:

should validate_format_of(:attr).not_with('1234')

...it means "the format of attr is not valid with the value 1234", and not "the format of attr is valid without the value 1234". For this reason, renaming #not_with to #without doesn't really make sense in this context.

I'm just a passing observer, but the original proposal of using #allowing and #denying seem more sensible than #with and #without.

@mxie
thoughtbot, inc. member

Thanks for your pull request! Unfortunately though, I'm going to close this since we will be deprecating the matcher in the next major release. See #252.

@mxie mxie closed this Mar 25, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment