thoughtbot--shoulda-matchers/lib
Anthony Navarre + Elliot Winkler 57a19228b6 Uniqueness: Fix default behavior for case-insensitive models
If you have a model that has a uniqueness validation using
`case_sensitive: false`, and you are testing against but do not qualify
the matcher with `case_insensitive`, then the matcher will pass
unexpectedly. Take this model for instance:

    class Product < ActiveRecord::Base
      validates_uniqueness_of :name, case_sensitive: false
    end

Currently, the following test passes. With this commit, it will now
(correctly) fail:

    describe Product do
      it { is_expected.to validate_uniqueness_of(:name) }
    end
2015-02-17 10:40:31 -07:00
..
shoulda Uniqueness: Fix default behavior for case-insensitive models 2015-02-17 10:40:31 -07:00
shoulda-matchers.rb Switched to allowing a more canonical require statement 2011-01-31 16:45:13 -05:00