Vipul A M
4bd8ccd984
fix repeat of test; remove unused variable by use of each_key
2013-03-18 19:58:02 +05:30
Carlos Antonio da Silva
28cb11045b
Merge pull request #9757 from vipulnsward/remove_message_param
...
remove unused parameter passed to assert_query_equal method
2013-03-17 08:35:06 -07:00
Vipul A M
b9f7e634ad
refactor test to drop unnecessary hash creation, test directly instead
2013-03-17 16:21:33 +05:30
Vipul A M
c7ea42c244
remove unused parameter passed to assert_query_equal method
2013-03-17 15:15:00 +05:30
Steve Klabnik
feaa6e2048
Revert "Merge pull request #8156 from fredwu/acronym_fix-master"
...
This reverts commit 867dc1700f32aae6f98c4651bd501597e6b52bc0, reversing
changes made to 9a421aaa8285cf2a7ecb1af370748b0337818930.
This breaks anyone who's using ForceSSL: https://travis-ci.org/rails-api/rails-api/jobs/5556065
Please see comments on #8156 for some discussion.
2013-03-16 15:25:49 -07:00
Fred Wu
515feb1fd6
Fixed a bug where the inflector would replace camelCase strings and disregarding specified acronyms, fixes #8015
2013-03-17 00:31:00 +11:00
Steve Klabnik
1a9055073d
Revert "make new rails apps log to STDOUT"
...
This reverts commit b7d9d6e2cd5082d269dafbc0316e2107febe1451.
Per discussion with @jeremy and @rubys on Campfire.
2013-03-15 10:38:00 -07:00
Terence Lee
b7d9d6e2cd
make new rails apps log to STDOUT
2013-03-15 10:05:10 -07:00
Andrew White
dff86e6ea0
Add regression tests for #9678
...
The bug with `ActiveSupport::TimeZone.parse` described in #9678 was
unwittingly fixed in 005d910 so add some tests to prevent regression.
2013-03-13 05:46:34 +00:00
Carlos Antonio da Silva
466ff9310a
Merge pull request #9681 from vipulnsward/fix_typo_in_module_name
...
Fix typo in DependenciesTestHelpers module name
2013-03-12 03:55:30 -07:00
Vipul A M
8778e1c4af
Fix typo in DependenciesTestHelpers module name
2013-03-12 10:33:32 +05:30
Vipul A M
647a9abb02
Cleanup tests for unused variables
2013-03-11 16:03:10 +05:30
Paul Nikitochkin
20ae0d0e39
Fixed tests for returning an instance of Time
in the local system timezone.
2013-03-10 23:57:11 +02:00
Charles Jones
b8837066dc
Fix deletion of empty directories:
...
1. When comparing the directory to delete against the top level
cache_path, use File.realpath to make sure we aren't comparing two
unequal strings that point to the same path. This occurs, for
example, when cache_path has a trailing slash, which it does in the
default Rails configuration. Since the input to
delete_empty_directories never has a trailing slash, the comparison
will never be true and the top level cache directory (and above) may
be deleted. However…
2. File.delete raises EPERM when trying to delete a directory, so no
directories have ever been deleted. Changing the code to Dir.delete
fixes that.
2013-02-25 18:54:44 -06:00
Chris Baynes
fa891a2b9d
Keep second fraction when DateTime#change is called.
2013-02-25 11:05:49 +01:00
stopdropandrew
cb100ca02b
Added ActiveSupport::TimeWithZone#to_r
for Time#at
compatibility.
2013-02-24 13:24:50 -08:00
Carlos Antonio da Silva
38f347a825
Move number_to_human test from AP to AS
...
Since all changes from #9347 are related to AS, it seems proper that the
test is placed there as well.
2013-02-22 19:44:50 -03:00
Gagan Awhad
6f380d3778
Added beginning_of_minute support to core_ext calculations for Time and DateTime
2013-02-21 16:14:16 -06:00
Beyond
d59a877da4
added compress options for gzip
...
added test for compress options of gzip
update changelog
2013-02-10 20:01:42 +09:00
Jeremy Kemper
c7598134a4
Merge pull request #9128 from jamesotron/iso8601-sub-second-accuracy
...
Modify TimeWithZone#as_json to return 3DP of sub-second accuracy.
2013-02-06 12:33:28 -08:00
Akira Matsuda
9ec14c223b
Missing require extract_options
2013-01-31 15:56:47 +09:00
James Harton
28ab79d7c5
Modify TimeWithZone#as_json to return 3DP of sub-second accuracy by default, since it's allowed by the spec and is very useful.
2013-01-31 14:11:51 +13:00
Xavier Noria
30034dfbc4
Merge pull request #8830 from antoinelyset/master
...
Improve String#squish whitespaces matching
2013-01-28 13:24:56 -08:00
Akira Matsuda
5f30b547c8
Use Encoding::UTF_8 constant 🚯
2013-01-28 17:06:02 +09:00
Akira Matsuda + Koichi Sasada
b7b27fc2a3
Set Thread.abort_on_exception for the whole AS, AP, and AR tests
...
this would give us some more clues in case a test silently dies inside Thread
2013-01-24 20:00:45 +09:00
Akira Matsuda
9b0f3faab4
Fix some wrong String extensions tests
...
* ASCII_STRING was not an ASCII String
* BYTE_STRING was not an in valid UTF-8 String
* added an assertion for non-UTF-8 String
2013-01-23 13:30:55 +09:00
Akira Matsuda
389ae055ae
Test String#dasherize
2013-01-23 13:29:40 +09:00
Akira Matsuda
740d363890
Test that rescue_from accepts a class name in String
2013-01-23 13:29:40 +09:00
Akira Matsuda
ffd0dd31f8
Test Kernel#quietly
2013-01-23 13:29:40 +09:00
Akira Matsuda
36ff09d7da
Test try! with a block
2013-01-23 13:29:40 +09:00
Akira Matsuda
ce0f977ae9
Test that DeprecatedConstantProxy does not warn when accessing its class
2013-01-23 13:29:40 +09:00
Akira Matsuda
4c5c98d0d3
Missing AS::Deprecation::DeprecatedObjectProxy test
2013-01-23 13:29:40 +09:00
Akira Matsuda
6343227bb0
Test that a DateTime acts_like_date
2013-01-23 13:29:40 +09:00
Antoine Lyset
b5245da94a
Improve String#squish whitespaces matching
2013-01-22 22:46:11 +01:00
Xavier Noria
3f18f73c20
Merge pull request #8671 from xuanxu/fix_irregular
...
Inflector irregular singularize rules
2013-01-21 08:06:26 -08:00
Andrew White
ee3458217b
Use DateTime.parse
inside String#to_datetime
...
Use the standard library's `DateTime.parse` because it's marginally
faster and supports partial date/time strings.
Benchmark:
user system total real
old 3.980000 0.000000 3.980000 ( 3.987606)
new 3.640000 0.010000 3.650000 ( 3.641342)
2013-01-21 12:33:49 +00:00
Andrew White
b79adc4323
Standardise the return value of to_time
...
This commit standardises the return value of `to_time` to an instance
of `Time` in the local system timezone, matching the Ruby core and
standard library behavior.
The default form for `String#to_time` has been changed from :utc to
:local but research seems to suggest the latter is the more common form.
Also fix an edge condition with `String#to_time` where the string has
a timezone offset in it and the mode is :local. e.g:
# Before:
>> "2000-01-01 00:00:00 -0500".to_time(:local)
=> 2000-01-01 05:00:00 -0500
# After:
>> "2000-01-01 00:00:00 -0500".to_time(:local)
=> 2000-01-01 00:00:00 -0500
Closes #2453
2013-01-21 12:33:49 +00:00
Carlos Antonio da Silva
239a97af55
Fix failing test about date.order translation values
...
Introduced in b718998f3e8e6f3d01ad138e40f08fbcc3736285.
2013-01-19 19:32:33 -02:00
gsphanikumar
0246712bc1
Test to allow Range including DateTime and DateTime::Infinity
...
Closes #8587
2013-01-14 00:51:43 -02:00
Yves Senn
3e1ed7818b
extract PerformanceTest into rails-performance_tests gem
2013-01-10 17:09:06 +01:00
Aaron Patterson
56f3d05f47
adding start / finish on the instrumenter, adding tests for the class
2013-01-09 15:34:58 -08:00
Vijay Dev
f92c2b103e
Merge pull request #8859 from tehgeekmeister/master
...
Fix a typo in a test.
2013-01-09 13:53:24 -08:00
Ezekiel Smithburg
77828e20fc
s/messqage/message/ in message_encryptor_test.rb
2013-01-09 13:32:35 -08:00
Jeremy Kemper
46e0d2397e
CVE-2013-0156: Safe XML params parsing. Doesn't allow symbols or yaml.
2013-01-08 12:42:29 -08:00
Jeremy Kemper
c31cc963da
Revert "Merge branch 'master-sec'"
...
This reverts commit 88cc1688d0cb828c17706b41a8bd27870f2a2beb, reversing
changes made to f049016cd348627bf8db0d72382d7580bf802a79.
2013-01-08 12:41:04 -08:00
Jeremy Kemper
2ced6f2f8a
CVE-2013-0156: Safe XML params parsing. Doesn't allow symbols or yaml.
2013-01-08 12:03:34 -08:00
Akira Matsuda
c8e632bd9f
Namespace HashWithIndifferentAccess
2013-01-07 07:37:23 +09:00
Akira Matsuda
70ae89c321
Remove unnecessary begin..rescue..end, use only rescue
2013-01-06 15:41:14 +09:00
Yves Senn
947e1d5e85
deprecate assert_blank
and assert_present
.
...
They don't add any benefits over `assert object.blank?`
and `assert object.present?`
2013-01-05 18:04:52 +01:00
Kelly Stannard
ebd27d5714
Better error message for String#to_date
...
I did this because to_date gives a very unhelpful error message if you
do not pass in a correct date. In the process I think this cleans up the
code nicely and even better it tends to be slightly faster than the
current implementation.
Benchmark
https://gist.github.com/4440875
2013-01-04 16:39:18 +00:00