aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test
Commit message (Collapse)AuthorAgeFilesLines
...
* Get rid of the clear_i18n hack by using a different localeCarlos Antonio da Silva2012-06-241-20/+10
| | | | | Use a different and very specific locale for testing currency negative format, and an empty store for currency defaults.
* Move number helper i18n related tests to ASCarlos Antonio da Silva2012-06-241-0/+124
| | | | | They also make more sense here since all the related logic with I18n is handled by AS::NumberHelper, and not by AV anymore.
* Adds missing inflector tests to ensure idempotencyGodfrey Chan2012-06-212-0/+12
| | | | | | | | | | | | | This is a follow up to #4719. It appears that singularize and pluralize are supposed to be idempotent - i.e. when you call singularize or pluralize multiple times on the same string, you should get the same result. (At least for the "officially supported" cases that the stock inflector is designed to handle.) #4719 added the missing tests for regular cases, and this commit added the missing tests for the irregularities. While I'm at that, I also synced up the irregularity test cases with the current set of irregularity cases that we ship out-of-the-box.
* Add prev_quarter and next_quarter method in Time/Date/DateTimeparanoiase Kang2012-06-203-0/+37
|
* Remove extra test case.Mike Gehard2012-06-191-7/+4
| | | | Make the test description better reflect what is happening
* Fix lookup on HashWithIndifferentAccess for array values.Chris Zetter2012-06-181-0/+7
|
* make events not use date and time to determine parent_of. fixes #5932タコ焼き仮面2012-06-181-1/+3
|
* raise the same exception in order to keep path infoAaron Patterson2012-06-121-0/+13
| | | | | | Ruby 2.0.0 implements LoadError#path, but newly raised load errors will not contain the path information. Replace the error message, copy blame, and rereaise the same exception object
* Proc always respond_to :bindingAkira Matsuda2012-06-121-43/+39
|
* removes the obsolete require_association method from dependenciesXavier Noria2012-06-101-4/+0
| | | | | | | | This is an obsolete method from the very early days, apparently it was used circa 2004 because STI support was not smart enough. This method is not public interface, and we are heading a major version, so removal seems right.
* Eliminate dependency on Rails::VERSION::STRINGAndrew White2012-06-052-3/+21
| | | | | | To facilitate the use of ActiveSupport::Testing::Performance outside of a Rails application conditionally check for the presence of Rails::VERSION::STRING before including it in the environment string.
* add instance_accessor option to ActiveSupport::Configurable#config_accessorFrancesco Rodriguez2012-06-051-4/+18
| | | | | | | | | | Changes: * Add `instance_accessor` option to opt out of the instance writer and instance reader methods. * Raises a NameError if the name of the attribute is not valid. * Update documentation and tests. * Add CHANGELOG entry in activesupport.
* Reduce warning messages when running Active Support testsAndrew White2012-05-311-2/+3
| | | | Eliminate the warnings generated by redefining methods and constants.
* Merge pull request #6554 from erichmenge/remove-json-variablePiotr Sarnacki2012-05-301-2/+0
|\ | | | | Remove deprecated ActiveSupport::JSON::Variable.
| * Remove deprecated ActiveSupport::JSON::Variable.Erich Menge2012-05-301-2/+0
| |
* | Merge pull request #6541 from ↵Rafael Mendonça França2012-05-301-3/+3
|\ \ | |/ |/| | | | | tjouan/tj/activesupport-fix-tests-requiring-unsafe-umask Make tests pass with umask
| * Make File#atomic_write tests pass with umaskThibault Jouan2012-05-291-3/+3
| | | | | | | | | | | | Assertions on file permissions only pass with some combinations of file create mode and the process file mode creation mask. This mask should be applied on the file create mode before related assertions.
* | True, False, and Nil should be represented in as_json as themselves.Erich Menge2012-05-291-0/+6
|/
* JRuby return different Array for module contents.Arun Agrawal2012-05-291-1/+1
| | | | | Test was failing against JRuby. It loads like [Constant3 Constant1]
* Merge pull request #6525 from freerange/minitest-passthrough-exceptionsJosé Valim2012-05-291-8/+50
|\ | | | | Exceptions like Interrupt & NoMemoryError should not be rescued in tests.
| * Exceptions like Interrupt should not be rescued.James Mead2012-05-281-8/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Neither Test::Unit nor MiniTest rescue exceptions like Interrupt or NoMemoryError, but ActiveSupport::Testing::SetupAndTeardown#run which overrides MiniTest::Unit::TestCase#run rescues them. Rescuing an Interrupt exception is annoying, because it means when you are running a lot of tests e.g. when running one of the rake test tasks, you cannot break out using ctrl-C. Rescuing exceptions like NoMemoryError is foolish, because the most sensible thing to happen is for the process to terminate as soon as possible. This solution probably needs some finessing e.g. I'm not clear whether the assumption is that only MiniTest is supported. Also early versions of MiniTest did not have this behaviour. However, hopefully it's a start. Integrating with Test::Unit & MiniTest has always been a pain. It would be great if both of them provided sensible extension points for the kind of things that both Rails and Mocha want to do.
* | decoupling activesupport performance testing from actionview and adding testsAndrew Mutz2012-05-281-0/+40
|/
* Fix handling of negative zero in number_to_currencyJared Beck2012-05-281-0/+2
|
* Moving NumberHelpers from ActionView to ActiveSupportAndrew Mutz2012-05-273-0/+639
|
* Truncate now has the ability to receive a html option that allows it to call ↵Li Ellis Gallardo2012-05-261-0/+4
| | | | | | | | | | | | rails helpers. This way if my text is long I don't have to do something like this: .text = truncate(@text, :length => 27) if @text.size >= 27 = link_to "continue", notes_path, ....."")
* Fix Range#sum optimized versionAlexey Vakhov2012-05-251-0/+5
| | | | | | | | | | | | | | | | | | | | | | At 1bd4d1c67459a91415ee73a8f55d2309c0d62a87 was added Range#sum optimized version for arithmetic progressions. This improvment injected a defect with not integer range boundaries. The defect was fixed by e0adfa82c05f9c975005f102b4bcaebfcd17d241. The second commit really disabled optimization at all because in Ruby integer-valued numbers are instances of Fixnum and Bignum classes. We should #use is_a? (#kind_of?) method instead #instance_of? to check if value is numerical: 1.class # => Fixnum 1.instance_of?(Integer) # => false 1.is_a?(Integer) # => true -100_000_000_000.class # => Bignum -100_000_000_000.instance_of?(Integer) # => false -100_000_000_000.is_a?(Integer) # => true Moreover original implementation of Range#sum has a defect with reverse range boundaries. If the first boundary is less than the second range is empty. Current commit fixes and tests this case too.
* Add missing requires for deep_dup and hash ext testCarlos Antonio da Silva2012-05-241-0/+1
|
* Use deep_dup in the deep_transform_keys tests.Rafael Mendonça França2012-05-241-20/+98
| | | | | | | | Using only dup make some tests to not catch up an implementation error because the methods were changing the nested hashes. Related to: https://github.com/rails/rails/commit/541429fbe49b0671adb3842ab1818230d670ef9f#L1R96
* Add Hash#deep_transform_keys and Hash#deep_transform_keys! Also convert ↵Mark McSpadden2012-05-231-1/+16
| | | | deep_*_keys to use deep_transform_keys.
* Adding deep versions of stringify_keys and symbolize_keys (plain and bang) ↵Lucas Húngaro2012-05-231-0/+92
| | | | for nested hashes
* Add Hash#transform_keys and Hash#transform_keys! and refactor *_keys methods ↵Mark McSpadden2012-05-231-0/+15
| | | | to use them.
* changed xml type datetime to dateTime, fixes #6328Angelo capilleri2012-05-231-2/+2
| | | | | | | | | XmlMini define the xml 'datatime', but according to http://www.w3.org/TR/xmlschema-2/#dateTime could be better change this to 'dateTime' with upper case letter 'T. So 'DateTime' and 'Time' are redefined from 'datetime' to 'dateTime' add the changing to the changelog
* Merge pull request #5125 from winston/log_exception_when_cache_read_failsMichael Koziarski2012-05-211-0/+9
|\ | | | | #read_entry in ActiveSupport::Cache::FileStore should log details of the exception when an exception is thrown
| * #read_entry in ActiveSupport::Cache::FileStore should log details of the ↵Winston2012-02-221-0/+9
| | | | | | | | exception when an exception is thrown.
* | Add instance_accessor option to class_attributeAlexey Vakhov2012-05-221-0/+7
| |
* | Don't use assert_block method. It will be deprecated.kennyj2012-05-201-1/+1
| |
* | Handle case where ancestor is not the end of the chainAndrew White2012-05-191-0/+2
| |
* | Fix constantize so top level constants are looked up properly.Marc-Andre Lafortune2012-05-191-0/+18
| |
* | Make constantize look down the ancestor chain (excluding Object)Marc-Andre Lafortune2012-05-191-0/+17
| |
* | Merge pull request #6376 from jgaskins/timestamp-microsecondsJeremy Kemper2012-05-181-1/+3
|\ \ | | | | | | Increase numeric-timestamp precision to nanoseconds
| * | Increase `AR#cache_key` precision to nanosecondsJamie Gaskins2012-05-191-1/+3
| | |
* | | Merge pull request #6183 from nashby/fix-issue-6179Jeremy Kemper2012-05-183-33/+49
|\ \ \ | | | | | | | | wrap time ranges with timezones
| * | | respect nsec in TimeWithZoneVasiliy Ermolovich + Sergey Nartimov2012-05-183-35/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | when we pass fractional usec to Time methods we should use Rational instead of Float because of accuracy problem Time.local(2011,6,12,23,59,59,999999.999).nsec # => 999999998 Time.local(2011,6,12,23,59,59,Rational(999999999, 1000)).nsec # => 999999999
| * | | wrap time ranges with timezones, closes #6179Vasiliy Ermolovich2012-05-171-1/+9
| | | |
* | | | Fix warning: possibly useless use of % in void contextkennyj2012-05-191-1/+1
| | | |
* | | | doesn't modify params in SafeBuffer#%Vasiliy Ermolovich2012-05-181-0/+7
| |/ / |/| |
* | | Merge pull request #6361 from markmcspadden/issue_6265José Valim2012-05-171-2/+2
|\ \ \ | | | | | | | | Remove special cases for duplicable? on Class and Module
| * | | Remove special cases for duplicable? on Class and ModuleMark McSpadden2012-05-171-2/+2
| | | |
* | | | Ensure blocks given to subscriber are properly yieldJosé Valim2012-05-171-1/+1
| | | |
* | | | Fix an issue with inflection where my_analyses (in plular form) incorrectly ↵Anuj Dutta2012-05-161-0/+1
|/ / / | | | | | | | | | converted to my_analyasis(in singular form).