thoughtbot--shoulda-matchers/lib/shoulda/matchers
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
..
action_controller Consolidate set_session and set_flash APIs 2015-02-09 10:52:51 -07:00
active_model Remove deprecated matchers 2015-02-09 10:52:51 -07:00
active_record Uniqueness: Fix default behavior for case-insensitive models 2015-02-17 10:40:31 -07:00
doublespeak Remove all Ruby-emitted warnings 2014-07-18 18:00:08 -06:00
independent Add with_prefix to delegate_method 2014-12-15 22:38:27 -07:00
integrations Remove auto-detection of Rails / test framework 2015-02-09 10:52:51 -07:00
action_controller.rb Consolidate set_session and set_flash APIs 2015-02-09 10:52:51 -07:00
active_model.rb Handle RangeErrors emitted now in ActiveRecord 4.2 2015-01-22 21:05:09 -07:00
active_record.rb Move uniqueness validation to ActiveRecord module 2014-12-13 17:53:16 -05:00
configuration.rb Remove auto-detection of Rails / test framework 2015-02-09 10:52:51 -07:00
doublespeak.rb Allow multiple StrongParametersMatchers to exist at once. 2014-06-21 21:56:47 -06:00
error.rb Extract examples in README to inline documentation 2014-06-20 16:41:27 -06:00
independent.rb Rename DelegateMatcher to DelegateMethodMatcher 2014-08-29 11:57:26 -06:00
integrations.rb Remove auto-detection of Rails / test framework 2015-02-09 10:52:51 -07:00
matcher_context.rb Documentation updates 2014-12-25 01:13:30 -05:00
rails_shim.rb Remove Rails 3.x, Ruby 1.9.2, Ruby 1.9.3 2015-02-09 10:52:22 -07:00
util.rb Improve output of fail_with_message matcher 2015-01-22 21:05:08 -07:00
version.rb master == 3.0.0.alpha 2015-02-16 13:42:26 -07:00
warn.rb Deprecate ensure_inclusion_of 2014-07-23 19:35:20 -06:00