Commit Graph

1775 Commits

Author SHA1 Message Date
Nikita Afanasenko
1fab2002e3 Make XmlMini.with_backend usable with threads
`XmlMini.with_backend` now may be safely used with threads:

  Thread.new do
    XmlMini.with_backend("REXML") { rexml_power }
  end
  Thread.new do
    XmlMini.with_backend("LibXML") { libxml_power }
  end

Each thread will use it's own backend.
2012-11-15 20:23:05 +04:00
Xavier Noria
bff4d8d165 dependencies no longer trigger Kernel#autoload in remove_const [fixes #8213] 2012-11-15 04:36:36 +01:00
Aaron Patterson
8f6ce1a17e backporting Struct#to_h from ruby 2.0 2012-11-13 11:11:11 -08:00
Yves Senn
78dca35103 #as_json isolates options when encoding a hash. Closes #8182
Setting options in a custom `#as_json` method had side effects.
Modifications of the `options` hash leaked outside and influenced
the conversion of other objects contained in the hash.
2012-11-12 16:06:08 +01:00
Nikita Afanasenko
63ee59d48a Test Hash#diff deprecation, also prevent deprecation message in AS tests 2012-11-11 16:08:39 +04:00
Carlos Antonio da Silva
b67a03cf0b Merge pull request #7763 from route/full-capture
Kernel#capture replaced by version which can catch output from subprocesses
2012-11-08 18:10:54 -08:00
Aaron Patterson
4a7679ebca cleaning up constantize tests 2012-11-07 17:13:17 +09:00
Rafael Mendonça França
ae6d2efd84 Make the tests pass with minitest 4.2 2012-11-05 15:12:09 -02:00
Carlos Antonio da Silva
5cdeb5ef7d Fix typo in test name 2012-11-04 12:07:06 -02:00
Dmitry Vorotilin
346ccf376c Kernel#capture replaced by version which can catch output from subprocesses 2012-11-01 13:36:40 +04:00
Alexey Gaziev
b955939d55 Make caller attribute in deprecation methods optional 2012-10-30 10:23:41 +08:00
Carlos Antonio da Silva
d46f9e3731 Fix some assert_raise calls containing messages in Active Support 2012-10-28 17:54:24 -02:00
Jeremy Kemper
b79444053c Fix queueing tests that should be consuming the queue rather than draining it 2012-10-26 19:11:19 -07:00
Jeremy Kemper
26f52b2ac1 Job worker thread logs failed jobs too 2012-10-26 16:18:52 -07:00
Jeremy Kemper
411378efcf Job worker thread logs to stderr if no logger is provided 2012-10-26 16:18:52 -07:00
David Graham
f38e752bdf Implement replace method so key? works correctly. 2012-10-26 11:36:35 -06:00
Noah Hendrix
96f5ceaafb make the cache test more @tenderlove(ing) and not depend on internal implentation 2012-10-23 18:42:37 -07:00
Noah Hendrix
81b7112565 pass the key to the block in cache.fetch on misses 2012-10-23 00:04:42 -07:00
Aaron Patterson
a3ad0a7b67 fix assertions 2012-10-18 13:14:43 -07:00
thedarkone
9f84e60ac9 Make DescendantsTracker thread safe and optimize the #descendants method. 2012-10-18 12:08:01 -07:00
Aaron Patterson
4f106bbb2c some ruby interpreters don't have ruby-prof so just skip the tests
rather than exiting the process.
2012-10-18 12:04:51 -07:00
Xavier Noria
74bf8afb9f Revert "remove unnecessary object/conversions file"
This file is used at least by Active Merchant, its existence
is maybe not necessary but no big deal either.

This reverts commit ae9b3d7cecd77b9ace38671b183e1a360bf632b6.
2012-10-16 12:05:00 +02:00
Jeremy Kemper
775829869e Remove the queue container. Premature consolidation. Set up and maintain queues in the classes that use them instead. 2012-10-12 19:38:40 -07:00
Rafael Mendonça França
e68b97a4b6 Merge pull request #7007 from Mik-die/hash_extract
make Hash#extract! more symmetric with Hash#slice
2012-10-12 14:29:11 -07:00
Rafael Mendonça França
08f57bfb8f Move the TestQueue tests to the proper file 2012-10-12 14:42:26 -03:00
dfens
ab9140ff02 Cleanup trailing whitespaces 2012-10-12 09:56:39 +02:00
Aaron Patterson
b91a90e496 adding a test for b21f24d9807bd161af947cf0f0cc440c9adffb73 2012-10-11 18:26:52 -07:00
Xavier Noria
0787cea3bb let (array|hash)/conversions.rb load the extensions in object/to_(param|query).rb 2012-10-09 21:55:43 +02:00
Xavier Noria
3395633a50 adds a missing require 2012-10-09 19:41:14 +02:00
Xavier Noria
9492cb0257 adds missing require 2012-10-09 18:27:30 +02:00
Xavier Noria
2296e74973 Merge pull request #7817 from NARKOZ/object-conversions
remove unnecessary object/conversions file
2012-10-09 08:36:36 -07:00
Mikhail Dieterle
a4b1196163 add more testcases and doc about Hash#extract! 2012-10-08 01:20:37 +03:00
Mikhail Dieterle
5d27338ab0 make Hash#extract! more symmetric with Hash#slice 2012-10-08 01:20:36 +03:00
Jeremy Kemper
b9999c58c2 Ruby 2 compat. Hash[] now raises on bad elements rather than ignoring them. No sense over-testing this MRI-specific behavior. See ruby/ruby@8d6add973e 2012-10-06 20:57:22 -07:00
Michael Koziarski
0a507925cf Merge pull request #6952 from NZKoz/key_generator
Add ActiveSupport::KeyGenerator as a simple wrapper around PBKDF2
2012-10-02 14:26:16 -07:00
Nihad Abbasov
ae9b3d7cec remove unnecessary object/conversions file 2012-10-02 13:37:25 +05:00
Arun Agrawal
21051676fc warning fixed: (...) interpreted as grouped expression 2012-10-01 18:25:19 +05:30
Brian Durand
b784900208 fix broken cache tests 2012-09-30 21:56:47 -07:00
Michael Koziarski
def2ccb8e3 Add ActiveSupport::KeyGenerator as a simple wrapper around PBKDF2
This will be used to derive keys from the secret and a salt, in order to allow us to
do things like encrypted cookie stores without using the secret for multiple
purposes directly.
2012-10-01 14:22:19 +13:00
Steve Klabnik
7f1eef9b01 Fix other assertions that were backwards.
This time I used ack.
2012-09-30 12:37:59 -07:00
Steve Klabnik
06d173b382 fix order of assertions. 2012-09-30 11:08:11 -07:00
Brian Durand
e3a746b6fc Optimize ActiveSupport::Cache::Entry to reduce memory and processing overhead. 2012-09-30 09:26:04 -07:00
Wojciech Wnętrzak
b4006db471 Changed test names to match proper context 2012-09-28 22:58:27 +02:00
Andy Lindeman
ba34110677 ConstantLookup is not needed in every TestCase decendant 2012-09-26 23:21:52 -04:00
Jeremy Kemper
86ebe0bd36 Tests tag the Rails log with the current test class and test case 2012-09-26 11:17:02 -07:00
Jeremy Kemper
107fd8788f Allow wrapping a logger that hasn't set a formatter. Default to our SimpleFormatter. Otherwise we try extending nil with the tagging API. 2012-09-26 11:17:02 -07:00
Jeremy Kemper
d36f57f430 Add logger.push_tags and .pop_tags to complement logger.tagged 2012-09-26 10:16:40 -07:00
Mike Moore
b13400086c Add missing inflector dependency 2012-09-25 15:40:00 -06:00
Mike Moore
52db1f9148 Add register_spec_type test coverage 2012-09-24 14:24:08 -06:00
Mike Moore
4894eef448 Create ActiveSupport::Testing::ConstantLookup
AS::TC::ConstantLookup walks the test's name to find the constant it is describing.
This additional lookup logic is needed to better support minitest's spec DSL.
2012-09-24 13:44:49 -06:00