aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test/deprecation_test.rb
Commit message (Collapse)AuthorAgeFilesLines
* Enable `Layout/SpaceAfterSemicolon` cop to avoid newly adding odd spacingRyuta Kamizono2018-12-131-1/+1
| | | | Ref https://github.com/rails/rails/commit/59ff1ba30d9f4d34b4d478104cc3f453e553c67a#diff-38fb97fba84b1ef0f311c4110a597c44R35
* Make `deprecate` work for non-exists methodsyuuji.yaginuma2018-12-071-0/+7
| | | | | | | | Before #33325, `deprecate` works for non-exist methods. This is necessary, for example, if want to deprecate dynamically defined methods like attributes methods. Fixes #34646
* Raise a better exception when a invalid depreation behavior is setRafael Mendonça França2018-05-181-0/+8
| | | | Fixes #32928.
* Use assert_empty and assert_not_emptyDaniel Colson2018-01-251-1/+1
|
* Use assert_predicate and assert_not_predicateDaniel Colson2018-01-251-1/+1
|
* [Active Support] `rubocop -a --only Layout/EmptyLineAfterMagicComment`Koichi ITO2017-07-111-0/+1
|
* Use frozen-string-literal in ActiveSupportKir Shatrov2017-07-091-0/+1
|
* 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
|
* Send deprecation horizon and gem name as arguments to deprecation heavier ↵Willem van Bergen2017-04-191-6/+29
| | | | handler, and make sure they are used for the ActiveSupport::Notifications message.
* Add AS::Deprecation::DeprecatedConstantAccessorDominic Cleal2017-03-221-0/+23
| | | | | | | An alternative to DeprecatedConstantProxy which works more transparently with exceptions because it returns the object that the new constant refers to rather than a proxy. This is then compatible with `rescue OldException`.
* Change ActionView ERB Handler from Erubis to ErubiJeremy Evans2017-01-251-0/+10
| | | | | | | | | | | | | | | | | | | | | | | Erubi offers the following advantages for Rails: * Works with ruby's --enable-frozen-string-literal option * Has 88% smaller memory footprint * Does no freedom patching (Erubis adds a method to Kernel) * Has simpler internals (1 file, <150 lines of code) * Has an open development model (Erubis doesn't have a public source control repository or bug tracker) * Is not dead (Erubis hasn't been updated since 2011) Erubi is a simplified fork of Erubis that contains just the parts that are generally needed (which includes the parts that Rails uses). The only intentional difference in behavior is that it does not include support for <%=== tags for debug output. That could be added to the ActionView ERB handler if it is desired. The Erubis template handler remains in a deprecated state so that code that accesses it directly does not break. It can be removed after Rails 5.1.
* Add more rubocop rules about whitespacesRafael Mendonça França2016-10-291-3/+3
|
* Add three new rubocop rulesRafael Mendonça França2016-08-161-1/+1
| | | | | | | | Style/SpaceBeforeBlockBraces Style/SpaceInsideBlockBraces Style/SpaceInsideHashLiteralBraces Fix all violations in the repository.
* Add `Style/EmptyLines` in `.rubocop.yml` and remove extra empty linesRyuta Kamizono2016-08-071-1/+0
|
* applies remaining conventions across the projectXavier Noria2016-08-061-1/+0
|
* modernizes hash syntax in activesupportXavier Noria2016-08-061-1/+1
|
* applies new string literal convention in activesupport/testXavier Noria2016-08-061-24/+24
| | | | | The current code base is not uniform. After some discussion, we have chosen to go with double quotes by default.
* Fix missing requires for object/blankRafael Mendonça França2016-06-131-1/+1
|
* Bump the deprecation horizonRafael Mendonça França2016-05-101-1/+1
|
* Converting backtrace to strings before calling set_backtraceTony Novak2016-02-101-2/+2
| | | | Fixes #23058
* Deprecation warning now targets at 5.1Akira Matsuda2015-12-191-1/+5
| | | | | Also, added a test case to make sure that the default deprecation horizon is always bigger than the current Rails version.
* Merge pull request #21953 from bdunne/fix_dep_warnMatthew Draper2015-10-171-0/+8
| | | | Fix deprecation warning messages on deprecate_methods
* Removed use of mocha in active_supportRonak Jangir2015-07-101-8/+8
|
* - Extracted silence_stream method to new module in activesupport/testing.Vipul A M2015-01-201-16/+3
| | | | | | | | | | | | - Added include for the same in ActiveSupport::Test. - Removed occurrences of silence_stream being used elsewhere. - Reordered activesupport testcase requires alphabetically. - Removed require of silence stream from test_case - Moved quietly method to stream helper - Moved capture output to stream helper module and setup requires for the same elsewhere
* Keep quietly and capture undeprecated on your suiteRafael Mendonça França2014-07-151-0/+17
|
* Prefer assert_raise instead of flunk + rescue to test for exceptionsCarlos Antonio da Silva2013-12-191-6/+3
| | | | | | Change most tests to make use of assert_raise returning the raised exception rather than relying on a combination of flunk + rescue to check for exception types/messages.
* Change all `MiniTest` to `Minitest` since, `MiniTest` namespace has been ↵Vipul A M2013-12-181-1/+1
| | | | | | renamed to `Minitest` Ref: https://github.com/seattlerb/minitest/blob/master/History.txt
* renames the :abort deprecation behaviour to :raiseXavier Noria2013-08-131-3/+3
| | | | That is a better name, thanks @jeremy.
* defines a new :abort deprecation behaviour that raisesXavier Noria2013-08-131-0/+16
| | | | See the CHANGELONG message in the patch for further details.
* Test that DeprecatedConstantProxy does not warn when accessing its classAkira Matsuda2013-01-231-0/+1
|
* Missing AS::Deprecation::DeprecatedObjectProxy testAkira Matsuda2013-01-231-0/+5
|
* deprecate `assert_blank` and `assert_present`.Yves Senn2013-01-051-3/+4
| | | | | They don't add any benefits over `assert object.blank?` and `assert object.present?`
* Make caller attribute in deprecation methods optionalAlexey Gaziev2012-10-301-1/+1
|
* Change ActiveSupport::Deprecation to class.Piotr Niełacny2012-09-131-56/+78
| | | | | | | | | | | | | | | | | | | | | | | | ActiveSupport::Deprecation is now a class rather than a module. You can get instance of ActiveSupport::Deprecation calling #instance method. ActiveSupport::Deprecation.instance But when you need to get new object od ActiveSupport::Deprecation you need to just call #new. @instance = ActiveSupport::Deprecation.new Since you can create a new object, you can change the version and the name of the library where the deprecator concerned. ActiveSupport::Deprecation.new('2.0', 'MyGem') If you need use another deprecator instance you can select it in the options of deprecate method. deprecate :method, :deprecator => deprecator_instance Documentation has been updated.
* extend ActiveSupport::Deprecation with self, allow other objects to ↵Robert Pankowecki2012-09-131-0/+127
| | | | | | | | | | extend/include it also. test local deprecation deprecator object Test ActiveSupport::Deprecation when included
* Add test for default silence and stderr deprecation behaviorsCarlos Antonio da Silva2012-04-281-0/+20
|
* Remove more references to Test::UnitRafael Mendonça França2012-01-061-1/+1
|
* Remove unneeded testsRafael Mendonça França2012-01-061-18/+0
|
* fixed failing tests of ActiveSupport for deprecation testRaghunadh2011-05-211-1/+1
|
* fix failure if behavior is not define and try use the defaultCyril Mougel2010-07-011-0/+7
| | | | Signed-off-by: José Valim <jose.valim@gmail.com>
* Add the possibility to have several behaviors in AS::Deprecation.José Valim2010-07-011-0/+13
|
* Modify backtrace test to take implementations with slightly different ↵Yehuda Katz2009-12-131-1/+1
| | | | backtrace output into consideration.
* Fix deprecating =-methods by using send [#2431 status:resolved]Michael Siebert2009-08-091-0/+4
| | | | Signed-off-by: José Valim <jose.valim@gmail.com>
* Rework testing extensions to reflect the recent miniunit upheavalJeremy Kemper2008-11-071-11/+13
|
* Remove direct TestCase mixins. Add miniunit compatibility.Jeremy Kemper2008-11-071-1/+1
|
* Namespace Inflector, Dependencies, OrderedOptions, and TimeZone under ↵Joshua Peek2008-06-031-0/+10
| | | | ActiveSupport [#238 state:resolved]
* Remove unnecessary DeprecatedInstanceVariable classPratik Naik2008-05-131-10/+0
|
* Add class to deprecate instance variablesPratik Naik2008-05-061-0/+10
| | | | | Add ActiveSupport::Deprecation::DeprecatedInstanceVariable class to deprecate instance variables of primitive types such as stings.
* require abstract_unit directly since test is in load pathJeremy Kemper2008-01-051-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8563 5ecf4fe2-1ee6-0310-87b1-e25e094e27de