diff options
author | José Valim <jose.valim@gmail.com> | 2010-02-17 00:48:04 +0100 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2010-02-17 00:48:04 +0100 |
commit | 3f948a0e2951a8bb7f32e98a404fb5ff97cb2896 (patch) | |
tree | 8528d926c137a3a0f18c21642a8b6be1f334b6df /activeresource | |
parent | d4e008fd0f9ebac3383a0c3ac093de68db9e2e66 (diff) | |
parent | 762088a0ef1f69ab09833732cfe8190098303ee6 (diff) | |
download | rails-3f948a0e2951a8bb7f32e98a404fb5ff97cb2896.tar.gz rails-3f948a0e2951a8bb7f32e98a404fb5ff97cb2896.tar.bz2 rails-3f948a0e2951a8bb7f32e98a404fb5ff97cb2896.zip |
Merge master.
Diffstat (limited to 'activeresource')
-rw-r--r-- | activeresource/test/abstract_unit.rb | 6 | ||||
-rw-r--r-- | activeresource/test/cases/log_subscriber_test.rb | 6 |
2 files changed, 9 insertions, 3 deletions
diff --git a/activeresource/test/abstract_unit.rb b/activeresource/test/abstract_unit.rb index 1af535e811..1c6f92cba4 100644 --- a/activeresource/test/abstract_unit.rb +++ b/activeresource/test/abstract_unit.rb @@ -1,4 +1,7 @@ -require File.expand_path('../../../load_paths', __FILE__) +require File.expand_path('../../../bundler', __FILE__) + +lib = File.expand_path("#{File.dirname(__FILE__)}/../lib") +$:.unshift(lib) unless $:.include?('lib') || $:.include?(lib) require 'rubygems' require 'test/unit' @@ -6,7 +9,6 @@ require 'active_resource' require 'active_support' require 'active_support/test_case' -$:.unshift "#{File.dirname(__FILE__)}/../test" require 'setter_trap' require 'logger' diff --git a/activeresource/test/cases/log_subscriber_test.rb b/activeresource/test/cases/log_subscriber_test.rb index 56709b6fd3..45eb4da8a4 100644 --- a/activeresource/test/cases/log_subscriber_test.rb +++ b/activeresource/test/cases/log_subscriber_test.rb @@ -1,9 +1,13 @@ +railties_path = File.expand_path('../../../../railties/lib', __FILE__) +$:.unshift(railties_path) if File.directory?(railties_path) && !$:.include?(railties_path) + require "abstract_unit" require "fixtures/person" require "rails/log_subscriber/test_helper" require "active_resource/railties/log_subscriber" require "active_support/core_ext/hash/conversions" +# TODO: This test should be part of Railties class LogSubscriberTest < ActiveSupport::TestCase include Rails::LogSubscriber::TestHelper Rails::LogSubscriber.add(:active_resource, ActiveResource::Railties::LogSubscriber.new) @@ -28,4 +32,4 @@ class LogSubscriberTest < ActiveSupport::TestCase assert_equal "GET http://37s.sunrise.i:3000/people/1.xml", @logger.logged(:info)[0] assert_match /\-\-\> 200 200 106/, @logger.logged(:info)[1] end -end
\ No newline at end of file +end |