From 439096476abb8fbefdb47cf1705a6002d144faa7 Mon Sep 17 00:00:00 2001 From: Dylan Smith Date: Wed, 27 Feb 2013 04:00:52 -0500 Subject: [PATCH] Fix session clearing in the test helper. LogSubscriberTest ends up using the LogSubscripter::TestHelper which prevents the normal test helper from running, so the session must be cleared there as well. --- test/detailed_log_subscriber_test.rb | 1 + test/test_helper.rb | 1 + 2 files changed, 2 insertions(+) diff --git a/test/detailed_log_subscriber_test.rb b/test/detailed_log_subscriber_test.rb index dba7d32f3..b71c28c5e 100644 --- a/test/detailed_log_subscriber_test.rb +++ b/test/detailed_log_subscriber_test.rb @@ -9,6 +9,7 @@ def setup @page = { :page => { :id => 1, :title => 'Shopify API' } }.to_json @ua_header = "\"User-Agent\"=>\"ShopifyAPI/#{ShopifyAPI::VERSION} ActiveResource/#{ActiveResource::VERSION::STRING} Ruby/#{RUBY_VERSION}\"" + ShopifyAPI::Base.clear_session ShopifyAPI::Base.site = "http://localhost/admin" ActiveResource::LogSubscriber.attach_to :active_resource diff --git a/test/test_helper.rb b/test/test_helper.rb index f33cbeff3..d04206533 100644 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -34,6 +34,7 @@ def setup end end + ShopifyAPI::Base.clear_session ShopifyAPI::Base.site = "http://localhost/admin" ShopifyAPI::Base.password = nil ShopifyAPI::Base.user = nil