aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test/core_ext
Commit message (Collapse)AuthorAgeFilesLines
* 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
|
* defines prev_(month|year) in Date and Time to ease transition to 1.9, and ↵Xavier Noria2010-05-123-18/+34
| | | | deprecates last_(month|year)
* adds calendar reform test coverage for more relevant date calculationsXavier Noria2010-05-091-1/+14
|
* Backports Date#>> from 1.9 so that calculations do the right thing around ↵Xavier Noria2010-05-091-0/+27
| | | | | | | | | | the calendar reform Our next_month gives November for some late dates in September of 1582. Related methods, last_*, and in general advance have the same issues. This commit fixes those, see the test suite for expected behavior, which we still run in 1.9 to ensure it matches as we do with other methods defined in Date in 1.9.
* add test coverage for (last|next)_year on leap yearsXavier Noria2010-05-081-0/+8
|
* let Time.time_with_datetime_fallback handle properly years in the range 0..138Xavier Noria2010-05-053-1/+19
|
* adds test coverage for Date.current vs Date.today in ↵Xavier Noria2010-05-031-1/+45
| | | | Date.(yesterday|tomorrow) implementation
* revises tests for Date.yesterday and Date.tomorrowXavier Noria2010-05-021-3/+3
|
* array.to_xml should be able to handle all types of data elements [#4490 ↵Neeraj Singh2010-04-291-5/+5
| | | | | | state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com>
* Use explicit source encoding rather than forced UTF-8 from US-ASCII.Santiago Pastorino2010-04-261-1/+1
| | | | Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* Change HWIA#stringify_keys to return a HWIA not a HashJeremy Kemper2010-04-221-0/+3
|
* Restore HWIA#stringify_keys! and update changelogJeremy Kemper2010-04-221-3/+3
|
* HWIA delegates to to_hash symbolize_keys and stringify_keys and bang methods ↵Santiago Pastorino2010-04-221-2/+36
| | | | | | are not in the api Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* updates String#to_(date|date_time|time) to return nil for blank stringsDaniel Neighman2010-04-211-3/+6
|
* Switch to TimezoneProxy for later support of deferred TZ loadingJeremy Kemper2010-04-201-2/+5
|
* removes code written for Ruby < 1.8.7Xavier Noria2010-04-171-12/+0
|
* moves Object#singleton_class to Kernel#singleton_class to match Ruby also ↵Xavier Noria2010-04-052-5/+11
| | | | there, same for #class_eval to simplify, and adds coverage for class_eval
* Fix class_attribute so that it works with singleton classes.Carl Lerche2010-04-011-0/+6
|
* avoid method redefined; discarding old empty? warning [#4302 state:committed]Santiago Pastorino2010-03-301-8/+0
| | | | Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* Ruby 1.9.2: marshaling round-trips Time#zoneJeremy Kemper2010-03-281-12/+8
|
* Time zone tests were right all along.José Valim2010-03-281-4/+4
|
* Ruby's marshaling of Time instances doesn't respect the zone [#4282 ↵Santiago Pastorino2010-03-271-2/+2
| | | | | | state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com>
* Limit Array#extract_options! to directl instances of Hash and HWIA. Add ↵wycats2010-03-271-0/+34
| | | | extractable_options? to Hash so that subclasses of Hash can opt-into extractable behavior. This fixes an issue where respond_with wasn't working with subclasses of Hash that were provided by other libraries (such as CouchDB or Mashie) [#4145 state:resolved]
* fixing inconsistency with cattr_reader and matter_reader [#4172 state:resolved]Kabari Hendrick2010-03-272-1/+13
| | | Signed-off-by: wycats <wycats@gmail.com>
* Add support for a type=binary with an optional encoding=base64. If the ↵Josh Franklin2010-03-261-1/+3
| | | | | | encoding attribute is absent, the data is considered unencoded. [#2966 state:resolved]
* Remove test ordering bugEvan Phoenix2010-03-221-8/+14
| | | | | Don't reuse classes with class attributes when testing different use cases of class attributes.
* Singleton classes returns parent's methods with instance_methods(false) and ↵José Valim2010-03-191-0/+14
| | | | this makes remove_method in Module#delegate fail. Add a test case and fix the bug.
* Fix some more warnings on 1.9wycats2010-03-171-1/+1
|
* Be sure to pass through args to to_yamlJeremy Kemper2010-03-111-1/+1
|
* OutputBuffer#to_yaml should return string yaml, not some custom class dumpJeremy Kemper2010-03-111-0/+4
|
* class_attribute gets instance methods which delegate to but may override ↵Jeremy Kemper2010-03-081-10/+25
| | | | their class values as you'd expect. Disable instance writer methods with :instance_writer => false.
* no more interpreted as grouped expression warnings on array_ext_testSantiago Pastorino2010-02-261-2/+2
|