aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test/core_ext
Commit message (Collapse)AuthorAgeFilesLines
...
* | Fix ActiveSupport::TimeWithZone#localtime method with DateTimeAlvaro Bautista2010-11-111-0/+11
| | | | | | | | | | | | [#5344 state:committed] Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
* | Remove unused methodSantiago Pastorino2010-11-101-31/+0
| |
* | Remove useless cgiDenis Odorcic2010-11-101-15/+0
| | | | | | | | | | | | [#5943 state:committed] Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
* | Ensure that HashWithIndifferentAccess duplication preserves class (for ↵laserlemon2010-11-071-1/+14
| | | | | | | | | | | | sublclasses) and default value [#5724 state:resolved] Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
* | Allowing to_xml :camelize option to be set to :lower to enable ↵Jeremy Holland2010-11-031-1/+8
|/ | | | lower-camelcase tags [#5903 state:resolved]
* implements weeks_ago and prev_week for Date/DateTime/Time [#5122 ↵Rob Zolkos & Xavier Noria2010-10-163-0/+50
| | | | state:committed]
* Override #store to be consistent with #[].Andrea Campi2010-10-101-0/+10
| | | | | | [#5775 state:resolved] Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
* let Hash#to_param and Hash#to_query sort againXavier Noria2010-09-281-3/+7
| | | | | This was a regression introduced in 5c858220085dc4ddc1bec496747059dfbe32f1da. We bring sorting back because people rely on it, eg for constructing consistent cache keys.
* Make assert_valid_keys slightly faster.thedarkone2010-09-271-1/+1
|
* attr_accessor_with_default should raise an ArgumentError not a RuntimeErrorAaron Patterson2010-09-241-1/+1
|
* Exception handling more readableThiago Pradi2010-09-191-2/+2
| | | | | | [#5601 state:committed] Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
* Use `Time.current` to maintain consistency with AS::DurationPrem Sichanugrist2010-09-191-0/+38
| | | | | | | | | | In [32b82e4c6f5523cdf5ee78c3022c50b46e018351], the committer has switch methods in AS::Duration to use `Time.current` to return the correct duration based on the `Time.default_zone` instead of using `Time.now`. [#5607 state:committed] Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
* Move capture to Kernel. [#5641 state:resolved]Krekoten' Marjan2010-09-181-0/+5
|
* delegate method should treat :prefix => false same as :prefix => nilNeeraj Singh2010-09-011-0/+13
| | | | | | [#5375 state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com>
* Make ActiveSupport::Duration#method_missing delegate blocks to value [#5498 ↵Krekoten' Marjan2010-09-011-0/+8
| | | | | | state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com>
* let String#strip_heredoc handle blank lines even if they are not indentedXavier Noria2010-08-301-0/+9
|
* implements String#strip_heredocXavier Noria2010-08-291-0/+23
|
* Trifling typosRaphomet2010-08-211-2/+2
| | | | Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
* to_sentence should return a duplicateMatthew Mongeau2010-08-171-0/+5
|
* Class Attribute setter returns set valuePeter Wagenet2010-08-161-0/+5
| | | | Signed-off-by: wycats <wycats@gmail.com>
* Deletes trailing whitespaces (over text files only find * -type f -exec sed ↵Santiago Pastorino2010-08-1419-100/+100
| | | | 's/[ \t]*$//' -i {} \;)
* adds test coverage to ensure DateTime#advance processes first the date ↵Xavier Noria2010-08-051-12/+19
| | | | deltas, and then the time deltas
* adds test coverage for edge-cases of Array.wrap, and better documentation ↵Xavier Noria2010-07-281-0/+20
| | | | for how it differs from Kernel#Array
* Removes unused varsSantiago Pastorino2010-07-241-1/+1
| | | | Signed-off-by: José Valim <jose.valim@gmail.com>
* These tests are trusting in the order of the elements so use OrderedHash ↵Santiago Pastorino2010-07-211-2/+3
| | | | instead of Hash
* Test Hash#to_param escapes keys and valuesSantiago Pastorino2010-07-221-0/+4
| | | | [#5175]
* Hash#to_param is doesn't use sort anymore, some tests added for Hash#to_paramSantiago Pastorino2010-07-221-0/+25
|
* Don't rely on implementation-specific order-dependence of array comparisons ↵Nick Sieger2010-07-171-4/+5
| | | | | | in unit tests Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
* Define a convention for descendants and subclasses.José Valim2010-07-052-70/+19
| | | | | | The former should be symmetric with ancestors and include all children. However, it should not include self since ancestors + descendants should not have duplicated. The latter is symmetric to superclass in the sense it only includes direct children. By adopting a convention, we expect to have less conflict with other frameworks, as Datamapper. For this moment, to ensure ActiveModel::Validations can be used with Datamapper, we should always call ActiveSupport::DescendantsTracker.descendants(self) internally instead of self.descendants avoiding conflicts.
* Don't store incorrect values in zones_mapSantiago Pastorino2010-06-281-3/+1
| | | | | | [#4942 state:committed] Signed-off-by: José Valim <jose.valim@gmail.com>
* Added getbyte as a core_ext to Ruby < 1.9Santiago Pastorino2010-06-271-0/+8
| | | | Signed-off-by: José Valim <jose.valim@gmail.com>
* when the timezone is nil, a TimeWithZone object should not be constructed. ↵Aaron Patterson2010-06-171-0/+7
| | | | | | [#4881 state:resolved] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* Date#since, #ago, #beginning_of_day, #end_of_day, #xmlschema return ↵Geoff Buesing2010-06-121-1/+50
| | | | | | TimeWithZone when Time.zone_default is set Signed-off-by: Xavier Noria <fxn@hashref.com>
* Remove String#constantize depsJeremy Kemper2010-06-111-7/+8
|
* Merge remote branch 'rsim/oracle_enhanced_rails3'wycats2010-06-071-2/+2
|\
| * fix conditions when DateTime#to_date and DateTime#xmlschema methods are definedRaimonds Simanovskis2010-06-041-2/+2
| |
* | oops, two cancelling errors made a previous test pass, fixing itXavier Noria2010-06-071-1/+1
| |
* | the order in which we apply deltas in Date#advance matters, add test ↵Xavier Noria2010-06-071-0/+10
| | | | | | | | coverage for that
* | removes Array#random_element and backports Array#sample from Ruby 1.9, ↵Xavier Noria2010-06-051-7/+23
|/ | | | thanks to Marc-Andre Lafortune
* Extracted String#truncate from TextHelper#truncate [DHH]David Heinemeier Hansson2010-06-011-0/+29
|
* Fix test incorrectly using a bare assert to use assert_kind_ofSantiago Pastorino2010-05-241-1/+1
| | | | Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* Use multibyte proxy class on 1.9, refactor Unicode.Norman Clarke2010-05-211-5/+3
| | | | | | | | | | Makes String#mb_chars on Ruby 1.9 return an instance of ActiveSupport::Multibyte::Chars to work around 1.9's lack of Unicode case folding. Refactors class methods from ActiveSupport::Multibyte::Chars into new Unicode module, adding other related functionality for consistency. [#4594 state:resolved] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* 1.day should respond_to kind_of tooNeeraj Singh2010-05-211-0/+1
| | | | | | [#4656 state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com>
* Final iteration of use better testing methodsNeeraj Singh2010-05-1910-39/+39
| | | | | | [#4652 state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com>
* removes deprecations of last_(month|year) from master, they will be ↵Xavier Noria2010-05-192-16/+0
| | | | deprecated in 2.3 instead
* Renames Array#rand -> Array#random_elementRizwan Reza2010-05-171-4/+0
| | | | Signed-off-by: Xavier Noria <fxn@hashref.com>
* Revert "Moved encoding work in progress to a feature branch."wycats2010-05-171-0/+8
| | | | This reverts commit ade756fe42423033bae8e5aea8f58782f7a6c517.
* Moved encoding work in progress to a feature branch.Jeremy Kemper2010-05-161-8/+0
| | | | This reverts commits af0d1a88157942c6e6398dbf73891cff1e152405 and 64d109e3539ad600f58536d3ecabd2f87b67fd1c.
* Change on Array extension from rand => random_element [#4555 state:committed]Santiago Pastorino2010-05-161-4/+8
| | | | Signed-off-by: Xavier Noria <fxn@hashref.com>
* Initial work to improve the state of encodings for templateswycats2010-05-161-0/+8
|