aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test
Commit message (Collapse)AuthorAgeFilesLines
...
* | | | | | Only raise DelegationError if it's is the source of the exceptionAndrew White2013-07-111-0/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes situations where nested NoMethodError exceptions are masked by delegations. This would cause confusion especially where there was a problem in the Rails booting process because of a delegation in the routes reloading code. Fixes #10559
* | | | | | Add failing test for #9562Andrew White2013-07-101-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rails 4.0.0 fails when trying to encode an ActiveSupport::TimeWithZone that wraps a DateTime instance. This is fixed on master so add a test to prevent regression. (cherry picked from commit ad01b8da354268cebfae1519c28d19d75576ccb1)
* | | | | | Return local time for backwards compatibilityAndrew White2013-07-091-8/+25
| | | | | |
* | | | | | Retain UTC offset when using Time.at_with_coercionAndrew White2013-07-091-0/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The standard Ruby behavior for Time.at is to return the same type of time when passing an instance of Time as a single argument. Since the an ActiveSupport::TimeWithZone instance may be a different timezone than the system timezone and DateTime just understands offsets the best we can do is to return an instance of Time with the correct offset. Fixes #11350.
* | | | | | Fix microsecond precision of Time#at_with_coercionNeer Friedman2013-07-091-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When Time.at_with_coercion (wraps Time.at) is called with a single argument that "acts_like?(:time)" it is coerced to integer thus losing it's microsecond percision. This commits changes this to use `#to_f` to prevent the problem
* | | | | | Explicitly test for true and false.Jade Tucker2013-07-071-2/+2
| | | | | |
* | | | | | Make HashWithIndifferentAccess#select always return the hash.Marc Schütz2013-07-061-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Hash#select! returns nil if the hash didn't change and thus behaves differently from select, so it's return value can't be used as result for the latter.
* | | | | | Fixed test broken by local_constant_names Arun Agrawal2013-07-031-6/+0
| | | | | | | | | | | | | | | | | | depreciation removed
* | | | | | Remove deprecated `String#encoding_aware?` Arun Agrawal2013-07-032-7/+0
| | | | | | | | | | | | | | | | | | core extensions (`core_ext/string/encoding`).
* | | | | | Remove deprecated `Time#time_with_datetime_fallback`, `Time#utc_time`Vipul A M2013-07-031-55/+0
| | | | | | | | | | | | | | | | | | | | | | | | and `Time#local_time` in favour of `Time#utc` and `Time#local`
* | | | | | Remove deprecated Hash#diff with no replacement.Carlos Antonio da Silva2013-07-021-6/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If you're using it to compare hashes for the purpose of testing, please use MiniTest's assert_equal instead.
* | | | | | Remove deprecated `Date#to_time_in_current_zone`Vipul A M2013-07-021-7/+0
| | | | | |
* | | | | | Remove deprecated `Proc#bind` with no replacement.Carlos Antonio da Silva2013-07-011-14/+0
| | | | | |
* | | | | | Remove deprecated Array#uniq_by and Array#uniq_by!Carlos Antonio da Silva2013-07-011-30/+0
| | | | | | | | | | | | | | | | | | | | | | | | Use native Array#uniq and Array#uniq! instead.
* | | | | | Remove deprecated AS::BasicObject, use AS::ProxyObject insteadCarlos Antonio da Silva2013-07-011-12/+0
| | | | | |
* | | | | | remove deprecated `BufferedLogger`.Yves Senn2013-07-011-22/+0
| | | | | |
* | | | | | remove deprecated `assert_present` and `assert_blank`.Yves Senn2013-07-011-48/+0
| | | | | |
* | | | | | Move delegation error constant to inside ModuleCarlos Antonio da Silva2013-06-261-1/+1
| | | | | |
* | | | | | Merge pull request #10828 from southpolesteve/delegation_error_classYves Senn2013-06-261-1/+1
|\ \ \ \ \ \ | | | | | | | | | | | | | | Create DelegationError class
| * | | | | | Add DelegationError class. Rasied by delegation to a nil objectSteve Faulkner2013-06-261-1/+1
| | | | | | |
* | | | | | | Fix BacktraceCleaner#noise for multiple silencers.Mark J. Titorenko2013-06-201-0/+21
| |_|_|_|/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The previous implementation of BacktraceSilencer#noise did not work correctly if more than one silencer was configured -- specifically, it would only return noise which was matched by all silencers. The new implementation is such that anything that has been matched by silencers is removed from the backtrace using Array#- (array difference), ie. we now return all elements within a backtrace that have been matched by any silencer (and are thus removed by #silence). Fixes #11030.
* | | | | | Rewind StringIO instances before be parsed againPaco Guzman2013-06-165-0/+5
| | | | | |
* | | | | | Use xml instead already parsed xmlPaco Guzman2013-06-161-1/+1
| | | | | |
* | | | | | Merge pull request #10727 from pacoguzman/fix-xml-mini-testsRafael Mendonça França2013-06-156-6/+6
|\ \ \ \ \ \ | | | | | | | | | | | | | | Fix XmlMini different backends tests
| * | | | | | Compare with the parsed result from REXML backendPaco Guzman2013-05-226-6/+6
| | |_|/ / / | |/| | | |
* | | | | | Merge pull request #10740 from mrsimo/hash-with-indifferent-access-selectRafael Mendonça França2013-06-141-0/+30
|\ \ \ \ \ \ | | | | | | | | | | | | | | HashWithIndifferentAccess#select working as intended
| * | | | | | HashWithIndifferentAccess#select working as intendedAlbert Llop2013-05-231-0/+30
| |/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before this commit, #reject returned a HashWithIndifferentAccess, whereas #select returned a Hash. Now #select also returns a HashWithIndifferentAccess.
* | | | | | Merge pull request #10943 from killthekitten/10932_constantize_emptyXavier Noria2013-06-141-4/+4
|\ \ \ \ \ \ | | | | | | | | | | | | | | Fix #10932. Treat "" and "::" as invalid on constantize
| * | | | | | Fix #10932. Treat "" and "::" as invalid on constantizeNikolay Shebanov2013-06-141-4/+4
| | | | | | |
* | | | | | | Add missing nsec test for 17f5d8eAndrew White2013-06-131-0/+5
| | | | | | |
* | | | | | | Keep sub-second resolution when wrapping a DateTime valueAndrew White2013-06-132-0/+15
|/ / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add `DateTime#usec` and `DateTime#nsec` so that `ActiveSupport::TimeWithZone` keeps sub-second resolution when wrapping a `DateTime` value. Fixes #10855
* | | | | | Drop extra variable from testVipul A M2013-06-121-2/+2
| | | | | |
* | | | | | Don't blindly call blame_file! on exceptions in ↵Andrew Kreiling2013-06-092-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ActiveSupport::Dependencies::Loadable It is possible under some environments to receive an Exception that is not extended with Blamable (e.g. JRuby). ActiveSupport::Dependencies::Loadable#load_dependency blindly call blame_file! on the exception which throws it's own NoMethodError exception and hides the original Exception. This commit fixes #9521
* | | | | | Override Time.at to work with Time-like valuesAndrew White2013-06-081-0/+22
| |_|/ / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Time.at allows passing a single Time argument which is then converted to an integer. The conversion code since 1.9.3r429 explicitly checks for an instance of Time so we need to override it to allow DateTime and ActiveSupport::TimeWithZone values.
* | | | | Merge pull request #10784 from senny/10526_prevent_key_transformationRafael Mendonça França2013-06-031-0/+7
|\ \ \ \ \ | |_|/ / / |/| | | | Prevent side effects in `Hash#with_indifferent_access`.
| * | | | Prevent side effects in `Hash#with_indifferent_access`.Yves Senn2013-05-291-0/+7
| | | | |
* | | | | Allow Date to be compared with Time (like it was possible to compare Time ↵David Heinemeier Hansson2013-06-031-0/+4
| | | | | | | | | | | | | | | | | | | | with Date)
* | | | | Remove active_support/testing/pending.rb was deprecated.kennyj2013-06-011-11/+0
| | | | |
* | | | | Remove active_support/json/variable was deprecated.kennyj2013-06-011-7/+0
| | | | |
* | | | | Running isolated testsArun Agrawal2013-05-281-16/+0
|/ / / / | | | | | | | | | | | | These stopped running don't know when. But these should be running now.
* | | | Merge pull request #10763 from senny/10758_to_sentence_with_blank_elementsCarlos Antonio da Silva2013-05-261-0/+4
|\ \ \ \ | | | | | | | | | | test-case for `Array#to_sentence` with `blank?` items.
| * | | | add test-case for `Array#to_sentence with blank items.Yves Senn2013-05-261-0/+4
| |/ / /
* / / / Fix some typo in method names, variablesVipul A M2013-05-264-4/+4
|/ / /
* | | Bug fix: Evented notification subscribers can handle published eventsCarl Lerche2013-05-171-0/+22
| | |
* | | Merge pull request #10652 from md5/concern-multiple-includedRafael Mendonça França2013-05-161-0/+14
|\ \ \ | | | | | | | | Raise an error when multiple included blocks are defined for a Concern
| * | | Raise when multiple included blocks are definedMike Dillon2013-05-161-0/+14
| | | |
* | | | Merge pull request #10527 from zenspider/squishy_minitest5Aaron Patterson2013-05-162-111/+1
|\ \ \ \ | |/ / / |/| | | Squishy minitest5
| * | | Updates to make rails 4 happy with minitest 5:Ryan Davis2013-05-062-111/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | + Namespace changes, overhaul of runners. + Internal ivar name changes - Removed a logger globally applied to tests that spew everywhere?!? + Override Minitest#__run to sort tests by name. + Reworked testing isolation to work with the new cleaner architecture. - Removed a bunch of tests that just test minitest straight up. I think these changes were all merged to minitest 4 a long time ago. - Minor report output differences.
* | | | remove deprecation noticesAaron Patterson2013-05-151-16/+0
| | | |
* | | | Fix HWIA#to_hash behavior with array of hashes.kennyj2013-05-161-0/+5
| |_|/ |/| |