Przeglądaj źródła

only include threadsafe tests when using threadsafe

Peter McCracken 11 lat temu
rodzic
commit
8c415be31e
1 zmienionych plików z 2 dodań i 0 usunięć
  1. 2 0
      test/base_test.rb

+ 2 - 0
test/base_test.rb

@@ -80,7 +80,9 @@ class BaseTest < Test::Unit::TestCase
       ShopifyAPI::Base.headers['X-Custom'] = nil
       assert_nil ShopifyAPI::Product.headers['X-Custom']
     end
+  end
 
+  if ActiveResource::VERSION::MAJOR >= 4 && ActiveResource::VERSION::PRE == "threadsafe"
     test "#headers set in the main thread affect spawned threads" do
       ShopifyAPI::Base.headers['X-Custom'] = "the value"
       Thread.new do