diff options
Diffstat (limited to 'activeresource/test/cases')
-rw-r--r-- | activeresource/test/cases/base_test.rb | 6 | ||||
-rw-r--r-- | activeresource/test/cases/subscriber_test.rb | 3 |
2 files changed, 8 insertions, 1 deletions
diff --git a/activeresource/test/cases/base_test.rb b/activeresource/test/cases/base_test.rb index 91349b810a..0f10a0e4d7 100644 --- a/activeresource/test/cases/base_test.rb +++ b/activeresource/test/cases/base_test.rb @@ -5,6 +5,7 @@ require "fixtures/street_address" require "fixtures/beast" require "fixtures/proxy" require 'active_support/core_ext/hash/conversions' +require 'mocha' class BaseTest < Test::Unit::TestCase def setup @@ -98,10 +99,15 @@ class BaseTest < Test::Unit::TestCase mock.get "/customers/1.xml", {}, @luis end + @original_person_site = Person.site Person.user = nil Person.password = nil end + def teardown + Person.site = @original_person_site + end + ######################################################################## # Tests relating to setting up the API-connection configuration ######################################################################## diff --git a/activeresource/test/cases/subscriber_test.rb b/activeresource/test/cases/subscriber_test.rb index 3556fbf7cb..fb890e86cb 100644 --- a/activeresource/test/cases/subscriber_test.rb +++ b/activeresource/test/cases/subscriber_test.rb @@ -2,6 +2,7 @@ require "abstract_unit" require "fixtures/person" require "rails/subscriber/test_helper" require "active_resource/railties/subscriber" +require "active_support/core_ext/hash/conversions" class SubscriberTest < ActiveSupport::TestCase include Rails::Subscriber::TestHelper @@ -24,7 +25,7 @@ class SubscriberTest < ActiveSupport::TestCase matz = Person.find(1) wait assert_equal 2, @logger.logged(:info).size - assert_equal "GET http://somewhere.else:80/people/1.xml", @logger.logged(:info)[0] + 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 |