Commit Graph

31 Commits

Author SHA1 Message Date
Matthijs Langenberg 67a838574b Fix broken module namespacing in ActiveResource with Ruby 1.9 [#5699 state:resolved]
Following namespace use case was broken with Ruby 1.9:

  class Author < ActiveRecord::Base
    ...
  end

  module Api
    class Book < ActiveResouce::Base
    end
  end

Let's say XML contains <book><author><name>John</name></author>....

  Api::Book.first.author.class.to_s #=>
    Ruby 1.8.7: "Api::Book::Author" (namespaced, correct),
    Ruby 1.9: "Author" (toplevel, broken)

Signed-off-by: José Valim <jose.valim@gmail.com>
2010-09-27 23:10:55 +02:00
Gaston Ramos f85b38a36b - added mock to test ActiveResource::MissingPrefixParam in finder_test 2010-09-27 15:25:44 -03:00
Emilio Tagua f2765a1cb3 Refactor setup methods by extracting them in abstract_unit, remove TODO.
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-09-17 17:03:58 +02:00
Joshua Peek 30446f7b29 correct activeresource load path 2010-02-28 18:29:34 -06:00
Carlhuda 24ab5665b2 Revert "Fix test load paths for those not using bundler"
This reverts commit eec2d301d4.

This commit broke tests. You cannot have a file called "bundler" on the load path.
2010-02-23 17:31:17 -08:00
Joshua Peek eec2d301d4 Fix test load paths for those not using bundler 2010-02-15 10:20:11 -06:00
Jeremy Kemper 523002fe16 Fix isolated test fail due to missing mocha 2010-02-10 16:45:43 -08:00
Carl Lerche 9f01dff9c2 Get rails tests running on bundler 0.9 2010-01-31 19:13:43 -08:00
Joshua Peek 640d9e7e32 Autoload AMo test case 2010-01-04 16:29:07 -06:00
Joshua Peek 2601a16ede Autoload AS test case 2010-01-04 16:22:46 -06:00
Joshua Peek 7ee5843c3c Fully expand relative rails framework paths and make sure we aren't
adding any to the load path more than once.
2009-12-16 11:56:51 -06:00
Carlhuda c1304098cc Reorganize autoloads:
* A new module (ActiveSupport::Autoload) is provide that extends
    autoloading with new behavior.
  * All autoloads in modules that have extended ActiveSupport::Autoload
    will be eagerly required in threadsafe environments
  * Autoloads can optionally leave off the path if the path is the same
    as full_constant_name.underscore
  * It is possible to specify that a group of autoloads live under an
    additional path. For instance, all of ActionDispatch's middlewares
    are ActionDispatch::MiddlewareName, but they live under 
    "action_dispatch/middlewares/middleware_name"
  * It is possible to specify that a group of autoloads are all found
    at the same path. For instance, a number of exceptions might all
    be declared there.
  * One consequence of this is that testing-related constants are not
    autoloaded. To get the testing helpers for a given component,
    require "component_name/test_case". For instance, "action_controller/test_case".
  * test_help.rb, which is automatically required by a Rails application's
    test helper, requires the test_case.rb for all active components, so
    this change will not be disruptive in existing or new applications.
2009-12-02 20:01:08 -08:00
Joshua Peek 11e798ae0f Avoid adding component lib/ to load path multiple times 2009-11-09 23:28:36 -06:00
Yehuda Katz + Carl Lerche 4f6d6f7031 Have all the tests running off a single Gemfile 2009-10-20 16:34:44 -07:00
Jeremy Kemper 3e62503903 Fix tests 2009-10-14 14:47:11 -07:00
Yehuda Katz + Carl Lerche 7583a24ee0 Move mocha down below initial T::U require and bump version to 0.9.7 [#2858 state:resolved] 2009-07-01 11:53:17 -07:00
Joshua Peek 0b694a4ff4 Setup ActiveResource autoloads 2009-06-08 20:48:14 -05:00
Jeremy Kemper 6d4a4fabbb Cherry pick Active Support dependencies. Autoload. 2009-05-06 00:14:55 -07:00
Jeremy Kemper 0c407891fb Ensure Active Support is loaded locally rather than from RubyGems. [#1620 state:committed] 2009-03-08 11:04:23 -07:00
Jeremy Kemper b302e023b7 Require rubygems 2009-02-03 18:58:06 -08:00
Jeremy Kemper 278186534c Bump mocha requirement for Ruby 1.9 compat. Remove uses_mocha. 2009-02-03 18:40:22 -08:00
Joshua Peek b74b97fef5 Update uses_mocha in ActionMailer and ActiveResource 2008-07-19 11:14:12 -05:00
Cheah Chu Yeow cf32baf915 Rescue from Timeout::Error in ActiveResource::Connection.
Signed-off-by: Michael Koziarski <michael@koziarski.com>
2008-04-22 09:30:56 +12:00
David Heinemeier Hansson 70ac560e42 Removed breakpointer and Binding.of_caller in favor of relying on ruby-debug by Kent Sibilev since the breakpointer has been broken since Ruby 1.8.4 and will not be coming back [DHH]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6611 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-04-28 15:57:29 +00:00
David Heinemeier Hansson 1d5c34c2c2 Added find-by-path options to ActiveResource::Base.find [DHH]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6595 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-04-27 20:54:53 +00:00
Jeremy Kemper 1d8cd1d744 Squash test warnings.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6033 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-01-24 18:29:07 +00:00
Rick Olson 1bdb14bdd3 Increase ActiveResource::Base test coverage. Closes #7173, #7174 [Rich Collins]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6020 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-01-23 05:22:33 +00:00
Jeremy Kemper 93c816f0c2 move http_mock to lib so others can use it in their Ares tests
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5766 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-12-21 20:26:30 +00:00
Jeremy Kemper 7370e54cc4 *_path instance methods. Check for missing/invalid site uri. http_mock response takes message arg, extracts numeric code. Tests log to test/debug.log
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5680 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-12-05 19:12:51 +00:00
Jeremy Kemper c003a4acea consistent load path to prevent double loads
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4984 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-09-04 09:50:15 +00:00
David Heinemeier Hansson 99d268c853 Initial check-in of Active Resourse
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4492 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-06-25 14:44:22 +00:00