| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
| |
Use Time.new to create times where the current offset is not zero or
not in the local time zone - closes #4847 and #6651.
|
|
|
|
|
|
|
|
| |
Introduced in 1abe31670fdad2c357b4356b40a4567a46d16693
The test was failing when running on isolation, because the extensions were
not being loaded, thus 1.year.from_now was failing. Just use mktime
instead, adding 1 year to Time.now.
|
| |
|
|
|
|
|
| |
Also simplify I18n logic for Array#to_sentence, doing only one lookup
for all keys and using merge!, instead of one lookup for each option key.
|
|
|
|
|
| |
Use a different and very specific locale for testing currency negative
format, and an empty store for currency defaults.
|
|
|
|
|
| |
They also make more sense here since all the related logic with I18n is
handled by AS::NumberHelper, and not by AV anymore.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
| |
Make the test description better reflect what is happening
|
| |
|
| |
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
Eliminate the warnings generated by redefining methods and constants.
|
|\
| |
| | |
Remove deprecated ActiveSupport::JSON::Variable.
|
| | |
|
|\ \
| |/
|/|
| |
| | |
tjouan/tj/activesupport-fix-tests-requiring-unsafe-umask
Make tests pass with umask
|
| |
| |
| |
| |
| |
| | |
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.
|
|/ |
|
|
|
|
|
| |
Test was failing against JRuby.
It loads like [Constant3 Constant1]
|
|\
| |
| | |
Exceptions like Interrupt & NoMemoryError should not be rescued in tests.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
|/ |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
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, ....."")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
deep_*_keys to use deep_transform_keys.
|
|
|
|
| |
for nested hashes
|
|
|
|
| |
to use them.
|
|
|
|
|
|
|
|
|
| |
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
|
|\
| |
| | |
#read_entry in ActiveSupport::Cache::FileStore should log details of the exception when an exception is thrown
|
| |
| |
| |
| | |
exception when an exception is thrown.
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
|\ \
| | |
| | | |
Increase numeric-timestamp precision to nanoseconds
|
| | | |
|
|\ \ \
| | | |
| | | | |
wrap time ranges with timezones
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
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
|
| | | | |
|
| | | | |
|
| |/ /
|/| | |
|