Commit Graph

1152 Commits

Author SHA1 Message Date
Xavier Noria
8a657c0dc7 adds test coverage to ensure DateTime#advance processes first the date deltas, and then the time deltas 2010-08-05 16:12:43 +02:00
Neeraj Singh
4952a80200 adding test for respond_to cache_key and cleaning up the ENV settings 2010-07-28 21:02:45 +08:00
Neeraj Singh
7d29627be9 test cases for rails_app_version in AS cache.rb 2010-07-28 21:02:45 +08:00
Neeraj Singh
3265af5c8b adding more test cases for expand_cache_key 2010-07-28 21:02:44 +08:00
Xavier Noria
e17e08efef adds test coverage for edge-cases of Array.wrap, and better documentation for how it differs from Kernel#Array 2010-07-28 03:49:04 +02:00
Santiago Pastorino
a2ca9cb78d This is a hash in 1.9.2 2010-07-26 20:09:34 -03:00
Aaron Patterson
32844cbc02 fixing space errors 2010-07-26 09:58:35 -07:00
Leigh Caplan
37d82f2ca0 Test to ensure that falsy objects aren't wrapped by deprecation proxies 2010-07-26 09:53:42 -07:00
Bernerd Schaefer
e87e3db200 XmlMini.rename_key emits valid xml with dasherize
This resolves issues for libraries which use '_' prefixed keys in their
attributes hash, such as Mongoid. A key like "_id" or "_type" will no
longer be converted to "<-id>" and "<-type>".

Signed-off-by: wycats <wycats@gmail.com>
2010-07-26 09:48:22 -07:00
Santiago Pastorino
4ea1753fc2 This is for making sure const_missing is triggered without warnings 2010-07-26 12:51:52 -03:00
Neeraj Singh
78c8242d2f strengthening the test suite for rescue_from
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-07-26 16:48:50 +02:00
Neeraj Singh
a5bb1f511f strengthening the rescue_from test suites
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-07-26 16:48:45 +02:00
wycats
1b97701e51 Fix a bug where requires inside of autoloads were being added to the autoloaded_constants list, causing mayhem. [#5165 state:resolved] 2010-07-26 00:59:54 -07:00
Santiago Pastorino
b0b9bf3204 Object#returning removed
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-07-25 23:30:27 +02:00
José Valim
ff0d842454 Revert the previous three commits.
* AS::Notifications#instrument should not measure anything, it is not its responsibility;

* Adding another argument to AS::Notifications#instrument API needs to be properly discussed;
2010-07-25 20:46:42 +02:00
Aaron Patterson
b7e0408ca9 use a hash to collect optional statistics about the instrumentation 2010-07-25 11:11:23 -07:00
Santiago Pastorino
749948a264 Removing one AS/lib ruby and rake adds to $LOAD_PATH 2010-07-25 08:27:00 +08:00
José Valim
834bd23a07 Get rid of instrumenter.elapsed. 2010-07-24 10:22:22 +02:00
Santiago Pastorino
8289661903 Make this test, test again
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-07-24 01:19:47 +02:00
Santiago Pastorino
e1d4e78b15 Removes unused vars
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-07-24 01:19:44 +02:00
Santiago Pastorino
80cf6559ed Makes restore previosly saved warnings_on_first_load value and avoid warning
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-07-24 01:19:43 +02:00
Santiago Pastorino
30df88ae06 These tests are trusting in the order of the elements so use OrderedHash instead of Hash 2010-07-21 17:34:43 -07:00
Santiago Pastorino
6cbd085f69 Test Hash#to_param escapes keys and values
[#5175]
2010-07-22 06:29:59 +08:00
Santiago Pastorino
5c85822008 Hash#to_param is doesn't use sort anymore, some tests added for Hash#to_param 2010-07-22 06:23:13 +08:00
José Valim
9df9c4bac0 Add a test for elapsed and require missing benchmark file. 2010-07-20 17:07:18 +02:00
Kouhei Sutou
a6e95ba554 fix mixed encoding logs can't be logged.
[#4807 state:committed]

Signed-off-by: Kouhei Sutou <kou@cozmixng.org>
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2010-07-19 14:55:58 -07:00
Santiago Pastorino
3870366092 Float comparison adjustment
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-07-18 19:28:46 +02:00
Nick Sieger
ea7f1fb026 Don't rely on implementation-specific order-dependence of array comparisons in unit tests
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
2010-07-17 01:59:51 +08:00
Santiago Pastorino
725090942f We shouldn't rely on float comparison, delta added just in case float representation of this values aren't equal 2010-07-12 09:59:52 +08:00
Norman Clarke
6f83a57ac7 Improve bang method defs, make slice! operate in-place. [#5028 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-07-08 22:59:24 +02:00
José Valim
a5dda97602 Define a convention for descendants and subclasses.
The former should be symmetric with ancestors and include all children. However, it should not include self since ancestors + descendants should not have duplicated. The latter is symmetric to superclass in the sense it only includes direct children.

By adopting a convention, we expect to have less conflict with other frameworks, as Datamapper. For this moment, to ensure ActiveModel::Validations can be used with Datamapper, we should always call ActiveSupport::DescendantsTracker.descendants(self) internally instead of self.descendants avoiding conflicts.
2010-07-05 13:01:27 +02:00
Santiago Pastorino
cb321546b7 Time has it own implementation of xmlschema, now AMo doesn't depend on TZInfo
[#4979 state:committed]

Signed-off-by: José Valim <jose.valim@gmail.com>
2010-07-02 01:51:03 +02:00
Santiago Pastorino
4a0c514eb4 AS json refactor, move to_json implementation to core_ext and a cleanup a bit the code 2010-07-01 12:04:11 -07:00
Cyril Mougel
9024545a6b fix failure if behavior is not define and try use the default
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-07-01 12:17:21 +02:00
José Valim
e596a8e14c Add the possibility to have several behaviors in AS::Deprecation. 2010-07-01 10:26:45 +02:00
Alex Muntean
265b7c5edf Fix ActiveSupport::Multibyte::Chars#slice for empty strings when starting offset is negative [#4717 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-06-30 15:00:55 +02:00
James MacAulay
16cef77d37 Fix AS::MB::Chars#+ to not alter self [#4646 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-06-30 13:22:28 +02:00
Santiago Pastorino
b2633f9f93 Don't store incorrect values in zones_map
[#4942 state:committed]

Signed-off-by: José Valim <jose.valim@gmail.com>
2010-06-28 19:35:33 +02:00
Leigh Caplan
97a92a4cfd test that unknown zones don't store mapping keys
[#4942]

Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-06-28 19:35:27 +02:00
Santiago Pastorino
fa96638bf2 Added getbyte as a core_ext to Ruby < 1.9
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-06-27 20:30:24 +02:00
José Valim
3782010377 Oops. Make previous commit pass on 1.9.2. 2010-06-26 12:14:25 +02:00
José Valim
aa48ab05f4 Tidy up tests in previous commit since they did not assure an OrderedHash is returned (the test would pass for an array and would pass by chance for hashes).
[#4875 state:resolved]
2010-06-26 12:09:56 +02:00
chaitanyav
9958950f78 Add OrderedHash#invert to preserve order in ruby 1.8 [#4875]
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-06-26 12:05:25 +02:00
José Valim
7bd85a8fc2 Work around the fact the JSON gem was overwriting to_json implementation for all Ruby core classes.
This is required because the JSON gem is incompatible with Rails behavior and was not allowing ActiveModel::Errors to be serialized.
So we need to ensure Rails implementation is the one triggered. [#4890 state:resolved]
2010-06-26 12:01:13 +02:00
Paul Mucur
158e22dae0 Alias ActiveSupport::OrderedHash#update to ActiveSupport::OrderedHash.merge!
This ensures that an OrderedHash's keys are set up appropriately when using update.

[#4973 state:committed]

Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2010-06-25 15:02:20 -07:00
José Valim
6788db824a Move Rails::LogSubscriber to ActiveSupport::LogSubscriber, allowing frameworks like ActiveRecord and ActiveResource to log outsude Rails::Application [#4816 state:resolved] 2010-06-24 13:23:43 +02:00
Xavier Noria
6f83a5036d renames load_(once_)paths to autoload_(once_)paths in dependencies and config 2010-06-24 00:17:28 +02:00
David Calavera
b8330a2261 preventing memcached initialization errors with default servers list [#4921 state:resolved]
As of this writing the JRuby client does not support a default port.

Signed-off-by: Xavier Noria <fxn@hashref.com>
2010-06-22 16:28:29 +02:00
David Calavera
256a33d0fb defines ORIG_ARGV in Active Support's abstract_unit.rb (used in isolation.rb) [#4922 state:resolved]
Signed-off-by: Xavier Noria <fxn@hashref.com>
2010-06-22 16:27:09 +02:00
Xavier Noria
69fec3ab3f adds parens to silence a warning in the test suite of AS 2010-06-20 23:29:37 +02:00