aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test
Commit message (Collapse)AuthorAgeFilesLines
...
* | | Delegation method bugLi Ellis Gallardo2013-04-251-0/+5
|/ / | | | | | | | | | | Add documentation and test to delegation method that make sure we're aware that when a delegated object is not nil or false and doesn't respond to the method it will still raise a NoMethodError exception.
* | Adjust for daylight savings in String#to_timeAndrew White2013-04-231-2/+118
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The changes in b79adc4323 had a bug where if the time in the String was in standard time but the current time was in daylight savings then the calculated adjustment was off by an hour. This commit fixes this and adds extra tests for the following: * time in string is standard time, current time is standard time * time in string is standard time, current time is daylight savings * time in string is daylight savings, current time is standard time * time in string is daylight savings, current time is daylight savings Fixes #10306.
* | Merge pull request #10096 from benofsky/fix_skipping_object_callback_filtersRafael Mendonça França2013-04-211-0/+17
|\ \ | |/ |/| Fixes skipping object callback filters
| * Fixes skipping object callback filtersBen McRedmond2013-04-041-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows you to skip callbacks that are defined by objects, e.g. for `ActionController`: skip_after_filter MySpecialFilter Previously this didn't work due to a bug in how Rails compared callbacks in `Callback#matches?`. When a callback is compiled, if it's an object filter (i.e. not a method, proc, etc.), `Callback` now defines a method on `@klass` that is derived from the class name rather than `@callback_id`. So, when `skip_callback` tries to find the appropriate callback to remove, `Callback` can regenerate the method name for the filter object and return the correct value for `Callback#matches?`.
* | more descriptive NameError's messages for class attributesHrvoje Šimić2013-04-171-4/+6
| |
* | switch (and lazily convert) ivar names to 3.xSam Ruby2013-04-161-16/+15
| |
* | refactor order hash testVipul A M2013-04-111-5/+1
| |
* | Revert "Merge pull request #10158 from steveklabnik/issue_10125"Rafael Mendonça França2013-04-101-17/+0
| | | | | | | | | | | | | | | | This reverts commit fa3ef8e82ab2f96cf15ef9bc885b2468fad77621, reversing changes made to e0af93dd3a5eeee2e2a67b05f34afb66cc80c00b. Reason: Routes, Active Record and the rendering stack should not depend on the default locale
* | Removed unused setupAnupam Choudhury2013-04-101-2/+0
| |
* | Fixed typoAnupam Choudhury2013-04-101-1/+1
| |
* | Fix inflector to respect default locale.Nick Cox2013-04-101-0/+17
| | | | | | | | | | | | | | | | The inflector was made aware of locales in 7db0b073fec6bc3e6f213b58c76e7f43fcc2ab97, but it defaulted to :en. That should actually be our default locale instead. Fixes #10125
* | Add option to Class#class_attribute for skipping the query methodAgis-2013-04-061-2/+7
| |
* | Revert "Merge pull request #10034 from ↵Rafael Mendonça França2013-04-041-17/+0
| | | | | | | | | | | | | | | | | | benofsky/fix_skipping_object_callback_filters" This reverts commit c79c6980647eb76bfa52178711fb04ba7e9d403b, reversing changes made to ba4c27479add60b783a0e623c8a5d176c1dc9043. This broke all the tests. See https://travis-ci.org/rails/rails/builds/6061839
* | Merge pull request #10034 from benofsky/fix_skipping_object_callback_filtersRafael Mendonça França2013-04-041-0/+17
|\ \ | | | | | | Fixes skipping object callback filters
| * | Fixes skipping object callback filtersBen McRedmond2013-04-041-0/+17
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows you to skip callbacks that are defined by objects, e.g. for `ActionController`: skip_after_filter MySpecialFilter Previously this didn't work due to a bug in how Rails compared callbacks in `Callback#matches?`. When a callback is compiled, if it's an object filter (i.e. not a method, proc, etc.), `Callback` now defines a method on `@klass` that is derived from the class name rather than `@callback_id`. So, when `skip_callback` tries to find the appropriate callback to remove, `Callback` can regenerate the method name for the filter object and return the correct value for `Callback#matches?`.
* | Further simplify enumerable group_by testCarlos Antonio da Silva2013-04-041-3/+1
| |
* | Replaced inject with mapAnupam Choudhury2013-04-041-2/+2
| |
* | Removed unused comma after loop variableAnupam Choudhury2013-04-041-1/+1
| |
* | Added missing assertAnupam Choudhury2013-04-026-25/+37
|/
* fix some typos in ASVipul A M2013-03-302-13/+13
|
* determine_constant_from_test_name does not swallow NoMethodErrors [Yves Senn]Xavier Noria2013-03-281-0/+10
|
* Merge pull request #9523 from ↵Rafael Mendonça França2013-03-272-1/+9
|\ | | | | | | | | | | | | | | | | stopdropandrew/Instrumenter#instrument-yields-payload ActiveSupport::Notifications::Instrumenter#instrument should yield Conflicts: activesupport/CHANGELOG.md
| * ActiveSupport::Notifications::Instrumenter#instrument should yieldstopdropandrew2013-03-022-1/+9
| | | | | | | | its payload the same way that ActiveSupport::Notifications does. Fix spelling in test name.
* | Fix warning: mismatched indentatmmismatched indentations at 'end' with 'def'kennyj2013-03-191-1/+1
| |
* | Merge branch 'master-sec'Aaron Patterson2013-03-184-2/+39
|\ \ | | | | | | | | | | | | | | | | | | | | | * master-sec: fix protocol checking in sanitization [CVE-2013-1857] JDOM XXE Protection [CVE-2013-1856] fix incorrect ^$ usage leading to XSS in sanitize_css [CVE-2013-1855] stop calling to_sym when building arel nodes [CVE-2013-1854]
| * | JDOM XXE Protection [CVE-2013-1856]Ben Murphy2013-03-154-2/+39
| |/
* | Merge pull request #9774 from ↵Andrew White2013-03-181-0/+8
|\ \ | | | | | | | | | | | | senny/9772_reraise_no_method_error_in_proper_context `TimeWithZone` raises `NoMethodError` in proper context.
| * | `TimeWithZone` raises `NoMethodError` in proper context.Yves Senn2013-03-181-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | Closes #9772. `TimeWithZone` delegates everything to the wrapped `Time` object using `method_missing`. The result is that `NoMethodError` error will be raised in the context of `Time` which leads to a misleading debug output.
* | | fix repeat of test; remove unused variable by use of each_keyVipul A M2013-03-182-2/+2
|/ /
* | Merge pull request #9757 from vipulnsward/remove_message_paramCarlos Antonio da Silva2013-03-171-1/+1
|\ \ | | | | | | remove unused parameter passed to assert_query_equal method
| * | remove unused parameter passed to assert_query_equal methodVipul A M2013-03-171-1/+1
| | |
* | | refactor test to drop unnecessary hash creation, test directly insteadVipul A M2013-03-171-16/+10
|/ /
* | Revert "Merge pull request #8156 from fredwu/acronym_fix-master"Steve Klabnik2013-03-161-2/+0
| | | | | | | | | | | | | | | | | | This reverts commit 867dc1700f32aae6f98c4651bd501597e6b52bc0, reversing changes made to 9a421aaa8285cf2a7ecb1af370748b0337818930. This breaks anyone who's using ForceSSL: https://travis-ci.org/rails-api/rails-api/jobs/5556065 Please see comments on #8156 for some discussion.
* | Fixed a bug where the inflector would replace camelCase strings and ↵Fred Wu2013-03-171-0/+2
| | | | | | | | disregarding specified acronyms, fixes #8015
* | Revert "make new rails apps log to STDOUT"Steve Klabnik2013-03-151-11/+0
| | | | | | | | | | | | This reverts commit b7d9d6e2cd5082d269dafbc0316e2107febe1451. Per discussion with @jeremy and @rubys on Campfire.
* | make new rails apps log to STDOUTTerence Lee2013-03-151-0/+11
| |
* | Add regression tests for #9678Andrew White2013-03-131-0/+16
| | | | | | | | | | The bug with `ActiveSupport::TimeZone.parse` described in #9678 was unwittingly fixed in 005d910 so add some tests to prevent regression.
* | Merge pull request #9681 from vipulnsward/fix_typo_in_module_nameCarlos Antonio da Silva2013-03-124-7/+7
|\ \ | | | | | | Fix typo in DependenciesTestHelpers module name
| * | Fix typo in DependenciesTestHelpers module nameVipul A M2013-03-124-7/+7
| | |
* | | Cleanup tests for unused variablesVipul A M2013-03-112-3/+1
|/ /
* / Fixed tests for returning an instance of `Time` in the local system timezone.Paul Nikitochkin2013-03-101-5/+5
|/
* Fix deletion of empty directories:Charles Jones2013-02-251-0/+12
| | | | | | | | | | | | | | | 1. When comparing the directory to delete against the top level cache_path, use File.realpath to make sure we aren't comparing two unequal strings that point to the same path. This occurs, for example, when cache_path has a trailing slash, which it does in the default Rails configuration. Since the input to delete_empty_directories never has a trailing slash, the comparison will never be true and the top level cache directory (and above) may be deleted. However… 2. File.delete raises EPERM when trying to delete a directory, so no directories have ever been deleted. Changing the code to Dir.delete fixes that.
* Keep second fraction when DateTime#change is called.Chris Baynes2013-02-251-0/+3
|
* Added `ActiveSupport::TimeWithZone#to_r` for `Time#at` compatibility.stopdropandrew2013-02-241-0/+11
|
* Move number_to_human test from AP to ASCarlos Antonio da Silva2013-02-221-0/+7
| | | | | Since all changes from #9347 are related to AS, it seems proper that the test is placed there as well.
* Added beginning_of_minute support to core_ext calculations for Time and DateTimeGagan Awhad2013-02-213-0/+30
|
* added compress options for gzipBeyond2013-02-101-0/+18
| | | | | | added test for compress options of gzip update changelog
* Merge pull request #9128 from jamesotron/iso8601-sub-second-accuracyJeremy Kemper2013-02-061-1/+1
|\ | | | | Modify TimeWithZone#as_json to return 3DP of sub-second accuracy.
| * Modify TimeWithZone#as_json to return 3DP of sub-second accuracy by default, ↵James Harton2013-01-311-1/+1
| | | | | | | | since it's allowed by the spec and is very useful.
* | Missing require extract_optionsAkira Matsuda2013-01-311-0/+1
|/