Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Updated check for mock service to work with recent changes.

  • Loading branch information...
commit 5be371df1c7abaa5d3b6d5baf64d9d4b6a879f4d 1 parent 569a94e
Alex Koppel authored May 26, 2011
2  spec/cases/test_users_spec.rb
@@ -16,7 +16,7 @@
16 16
         raise Exception, "Must supply OAuth app id, secret, app_access_token, and callback to run live subscription tests!"
17 17
       end
18 18
 
19  
-      @is_mock = defined?(Koala::IS_MOCK) && Koala::IS_MOCK
  19
+      @is_mock = Koala.http_service.respond_to?(:mock?) && Koala.http_service.mock?
20 20
     end
21 21
 
22 22
     describe "when initializing" do
6  spec/support/mock_http_service.rb
@@ -6,8 +6,6 @@ module MockHTTPService
6 6
     include Koala::HTTPService
7 7
 
8 8
     # Mocks all HTTP requests for with koala_spec_with_mocks.rb
9  
-    IS_MOCK = true # this lets our tests figure out if we want to stub methods
10  
-
11 9
     # Mocked values to be included in TEST_DATA used in specs
12 10
     ACCESS_TOKEN = '*'
13 11
     APP_ACCESS_TOKEN = "**"
@@ -76,6 +74,10 @@ def self.make_request(path, args, verb, options = {})
76 74
       response_object
77 75
     end
78 76
 
  77
+    def self.mock?
  78
+      true
  79
+    end
  80
+
79 81
     protected
80 82
     def self.create_params_key(params_hash)
81 83
       if params_hash.empty?

0 notes on commit 5be371d

Please sign in to comment.
Something went wrong with that request. Please try again.