| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
[fixes #16279]
|
|\
| |
| | |
Added some missing activesupport test coverage
|
| | |
|
|/ |
|
|\
| |
| |
| |
| | |
Conflicts:
actionpack/test/abstract_unit.rb
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
We are planning to remove mocha from our test suite because of
performance problems. To make this possible we should stop require mocha
on ActionSupport::TestCase.
This should not affect applications since users still need to add mocha
to Gemfile and this already load mocha.
Added FIXME notes to place that still need mocha removal
|
| |
| |
| |
| |
| | |
this test case had a race condition where it could download data
multiple times. We'll download the data once at class load.
|
| | |
|
|\ \
| | |
| | |
| | | |
Word truncation
|
|/ / |
|
| |
| |
| |
| |
| | |
These methods are not random so they should not belings to SecureRandom
module.
|
| | |
|
| | |
|
| | |
|
|/
|
|
|
| |
This output isn't used anywhere for assertions so we can simply remove
it. The introducing commit was f238d495.
|
| |
|
|
|
|
|
|
|
| |
Previously this method always returns `.0` in the fractional part. This commit
changes it to preserve the fractional seconds instead.
Fixes #15994.
|
|
|
|
|
| |
Didn't get a chance to convert existing code, I'll skim through the code
base to make use of this later this afternoon.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Since d3071db1, the apply_inflections method check if the downcased
version of a string is contained inside the "whitelist" of uncountable
words. However, if the word is composed of capital letters, it won't be
matched in the list while it should.
We can't simply revert to the previous behavior as there is a
performance concern (benchmarked over /usr/share/dict/words):
Before d3071db1 135.610000 0.290000 135.900000 (137.807081)
Since d3071db1 22.170000 0.020000 22.190000 ( 22.530005)
With the patch 22.060000 0.020000 22.080000 ( 22.125771)
Benchmarked with http://git.io/aFnWig
This way, the solution is to put the down-case version of words inside
the @uncountables array.
|
|
|
|
|
|
|
| |
Ruby's original behaviour is that :
* It only returns a const name, not a qualified aname
* It returns a symbol, not a string
|
| |
|
|\
| |
| | |
Use with_parse_json_times helper in tests.
|
| | |
|
|/ |
|
| |
|
|\
| |
| |
| |
| | |
zuhao/refactor_activesupport_time_zone_test_helpers
Extract out with_env_tz helper method.
|
| |
| |
| |
| |
| | |
It’s used at so many places that extracting it out into a helper file
is worth doing.
|
|/ |
|
|\
| |
| | |
Add test cases for Hash#asset_valid_keys
|
| | |
|
| |
| |
| |
| |
| | |
Clean up I18n stored translations after test
continuation with #15714
|
|/ |
|
| |
|
|\
| |
| | |
Add test cases for #in? and #presence_in
|
| | |
|
|/ |
|
|
|
|
|
| |
Before HashWithIndifferentAccess were doing deep_dup of the inner hashes
when Hash doesn't do. Now both are behaving in the same way.
|
| |
|
|\
| |
| |
| | |
Fixed `ActiveSupport::TimeWithZone#-` so precision is not unnecessarily lost
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
When working with objects with a nanosecond component, the `-` method may
unnecessarily cause loss of precision.
`ActiveSupport::TimeWithZone#-` should return the same result as if we were
using `Time#-`:
Time.now.end_of_day - Time.now.beginning_of_day #=> 86399.999999999
Before:
Time.zone.now.end_of_day.nsec #=> 999999999
Time.zone.now.end_of_day - Time.zone.now.beginning_of_day #=> 86400.0
After:
Time.zone.now.end_of_day - Time.zone.now.beginning_of_day
#=> 86399.999999999
|
|\ \
| | |
| | | |
Test `except!` in other cases too
|
| | | |
|
|/ /
| |
| |
| |
| |
| |
| |
| |
| |
| | |
:precision was incorrectly being applied to Rationals
before:
ActiveSupport::NumberHelper.number_to_rounded Rational(10, 3), precision: 2
=> "3.3"
after:
ActiveSupport::NumberHelper.number_to_rounded Rational(10, 3), precision: 2
=> "3.33"
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
| |
Replacements:
5.ago => 5.seconds.ago
5.until => 5.seconds.until
5.since => 5.seconds.since
5.from_now => 5.seconds.from_now
The removed tests does not affect coverage – we have equivalent test cases in
the tests for `AS::Duration`.
See #12389 for the history and rationale behind this.
|
|\
| |
| |
| | |
Added partial days support to `DateTime`'s `advance` method.
|
| |
| |
| |
| |
| | |
You can now add partial days (e.g. 2.5.days) to `DateTime` with the advance method.
This was acheived by mimicing the `advance` implementation in `Time`.
|
|\ \
| | |
| | |
| | | |
Fix test cases for inflector.rb
|
|/ /
| |
| |
| |
| |
| | |
`yield` was missing in #with_dup, due to which 57 assertions were not running
in real, and all tests were passing by default.
Error was introduced in commit - 31ceb5e.
|
|\ \
| | |
| | | |
Array#to now accept negative position also.
|
| | |
| | |
| | |
| | | |
`Array#to` is working for negative position
|