aboutsummaryrefslogtreecommitdiffstats
path: root/activemodel/test/cases/validations/inclusion_validation_test.rb
Commit message (Collapse)AuthorAgeFilesLines
* Removed magic comments # encoding: utf-8 , since its default from ruby 2.0 ↵Vipul A M2015-02-031-1/+0
| | | | onwards.
* Use the new clear_validators! api to reset validators in testsCarlos Antonio da Silva2014-01-271-3/+3
|
* Let validates_inclusion_of accept Time and DateTime rangesAkira Matsuda2013-10-231-0/+22
| | | | fixes 4.0.0 regression introduced in 0317b93c17a46d7663a8c36edc26ad0ba3d75f85
* Use Range#cover? for Numeric ranges (tests via endpoints) and use ↵Charles Bergeron2013-05-271-0/+1
| | | | | | Range#include? for non-numeric ranges added changelog message
* Convert ActiveModel to 1.9 hash syntax.Patrick Robertson2013-05-011-13/+13
| | | | | I also attempted to fix other styleguide violations such as { a: :b } over {a: :b} and foo(b: 'bar') over foo( b: 'bar' ).
* Fix method redefined warnings.kennyj2012-08-291-0/+3
|
* Accept a symbol for `:in` option on inclusion and exclusion validatorsGabriel Sobrinho2012-08-241-0/+22
|
* `validates_inclusion_of` and `validates_exclusion_of` now acceptRafael Mendonça França2012-07-201-0/+10
| | | | | | `:within` option as alias of `:in` as documented. Fix #7118
* Update variable's name in the test case to reflect the class we're testingPrem Sichanugrist2011-11-181-6/+6
|
* Follow code conventions on some testsSebastian Martinez2011-05-101-1/+1
|
* No need to rescue here. Invoking the wrong method in an object can happen ↵José Valim2011-04-111-9/+0
| | | | anywhere if you are not careful. In other words, test your shit.
* Revert "Add :use_include option to allow user to explicitly use ↵José Valim2011-04-111-9/+0
| | | | | | | | `Range#include?` method in Ruby 1.9" Use :with => range.to_a instead. This reverts commit f6540211b5b9133c9f93c11655a04d613c237e67.
* Add :use_include option to allow user to explicitly use `Range#include?` ↵Prem Sichanugrist2011-04-101-0/+9
| | | | | | method in Ruby 1.9 In Ruby 1.9 we're currently use `Range#cover?` to fix the performance problem. However, there might be the case that you want to use `Range#include?` instead. This patch will give you that option.
* Add support for proc or lambda as an option for InclusionValidator, ↵Prem Sichanugrist2011-04-101-0/+21
| | | | | | ExclusionValidator, and FormatValidator You can now use a proc or lambda in :in option for InclusionValidator and ExclusionValidator, and :with, :without option for FormatValidator
* Change validates inclusion to use cover? for Ranges in ruby 1.9 [#6453 ↵Frederick Cheung2011-02-181-0/+9
| | | | | | state:committed] Signed-off-by: Xavier Noria <fxn@hashref.com>
* removed AR from all AMo tests, including any unneeded files (schema, ↵Josh Kalderimis2010-05-091-2/+0
| | | | fixtures and test helper)
* removed an old unused model in the AMo tests which also removes another AR ↵Josh Kalderimis2010-05-091-1/+0
| | | | dependency
* removed use of AR in AMo tests and removed testing of scopes (:on) in ↵Josh Kalderimis2010-05-081-11/+11
| | | | individual validation tests and moved them to their own test file
* Favor %{} in all code instead of (deprecated) {{}} as interpolation syntax ↵Lawrence Pit2010-05-031-1/+1
| | | | | | for I18n Signed-off-by: José Valim <jose.valim@gmail.com>
* No need to use ValidationsRepairHelper hack on ActiveModel anymore, ↵José Valim2009-12-231-21/+12
| | | | Model.reset_callbacks(:validate) is enough. However, tests in ActiveRecord are still coupled, so moved ValidationsRepairHelper back there.
* Add ActiveModel::Validations tests for regular ruby classesPratik Naik2009-03-201-0/+17
|
* Deprecate Error#on(attribute) in favour of Errors#[attribute]Pratik Naik2009-03-201-4/+4
|
* TestDatabase -> TestsDatabasePratik Naik2009-03-201-2/+2
|
* Move relevant validation tests from Active Record to Active ModelPratik Naik2009-03-201-0/+63