aboutsummaryrefslogtreecommitdiffstats
path: root/activemodel/test/cases/validations/conditional_validation_test.rb
Commit message (Collapse)AuthorAgeFilesLines
* Revert "No such class since 8d2866bb80fbe81acb04f5b0c44f152f571fb29f"Rafael Mendonça França2019-08-021-1/+1
| | | | This reverts commit dd779c9686f49f5ed6dda8ad5a1cb3b0788e1dd4.
* No such class since 8d2866bb80fbe81acb04f5b0c44f152f571fb29fAkira Matsuda2019-08-021-1/+1
|
* activemodel typo fix.alkesh262019-02-251-3/+3
|
* Use assert_predicate and assert_not_predicateDaniel Colson2018-01-251-21/+21
|
* Add cases to test combining validation conditionsbogdanvlviv2017-11-061-2/+47
| | | | | | | | | - Test condition that is defined by array of conditions - Test condition that is defined by combining :if and :unless - Test local condition that is defined by :if - Test local condition that is defined by :unless See http://edgeguides.rubyonrails.org/active_record_validations.html#combining-validation-conditions
* Remove deprecated `:if` and `:unless` string filter for callbacksRafael Mendonça França2017-10-231-66/+0
|
* Use frozen string literal in activemodel/Kir Shatrov2017-07-161-0/+2
|
* Revert "Merge pull request #29540 from kirs/rubocop-frozen-string"Matthew Draper2017-07-021-1/+0
| | | | | This reverts commit 3420a14590c0e6915d8b6c242887f74adb4120f9, reversing changes made to afb66a5a598ce4ac74ad84b125a5abf046dcf5aa.
* Enforce frozen string in RubocopKir Shatrov2017-07-011-0/+1
|
* Deprecate passing string to `:if` and `:unless` conditional options on ↵Ryuta Kamizono2017-02-041-5/+15
| | | | `set_callback` and `skip_callback`
* Add more rubocop rules about whitespacesRafael Mendonça França2016-10-291-1/+1
|
* Add three new rubocop rulesRafael Mendonça França2016-08-161-2/+2
| | | | | | | | Style/SpaceBeforeBlockBraces Style/SpaceInsideBlockBraces Style/SpaceInsideHashLiteralBraces Fix all violations in the repository.
* applies remaining conventions across the projectXavier Noria2016-08-061-1/+0
|
* applies new string literal convention in activemodel/testXavier Noria2016-08-061-2/+2
| | | | | The current code base is not uniform. After some discussion, we have chosen to go with double quotes by default.
* 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-1/+1
|
* use assert_empty in activemodel conditional validation test casesRajarshi Das2013-09-101-7/+7
|
* Convert ActiveModel to 1.9 hash syntax.Patrick Robertson2013-05-011-17/+17
| | | | | I also attempted to fix other styleguide violations such as { a: :b } over {a: :b} and foo(b: 'bar') over foo( b: 'bar' ).
* Follow code conventions on some testsSebastian Martinez2011-05-101-12/+12
|
* removed AR from all AMo tests, including any unneeded files (schema, ↵Josh Kalderimis2010-05-091-2/+0
| | | | fixtures and test helper)
* removed use of AR in AMo tests and removed testing of scopes (:on) in ↵Josh Kalderimis2010-05-081-21/+21
| | | | 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-12/+12
| | | | | | for I18n Signed-off-by: José Valim <jose.valim@gmail.com>
* No need to use ValidationsRepairHelper hack on ActiveModel anymore, ↵José Valim2009-12-231-2/+3
| | | | Model.reset_callbacks(:validate) is enough. However, tests in ActiveRecord are still coupled, so moved ValidationsRepairHelper back there.
* Deprecate Errors#on_base/add_to_base/invalid?/each_fullPratik Naik2009-03-211-3/+3
|
* TestDatabase -> TestsDatabasePratik Naik2009-03-201-2/+2
|
* Move relevant validation tests from Active Record to Active ModelPratik Naik2009-03-201-0/+140