Sha256: 8e17f40ad7356f1a1e60dd2554a89dc6d7ce7b2207352b03bbcd913327d6b158

Contents?: true

Size: 406 Bytes

Versions: 1

Compression:

Stored size: 406 Bytes

Contents

module Zinc
	@mock_rest_client = nil

	def self.mock_rest_client=(mock_client)
		@mock_rest_client = mock_client
	end

	def self.execute_request(opts)
		case opts[:method]
		when :post then @mock_rest_client.post opts
		when :get then @mock_rest_client.get opts
		end
	end
end

class TestResponse
	attr_accessor :code, :body
end

def test_response(body)
	if body.class == Hash
		body.to_json.to_s
	end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
zinc-0.1.0 spec/test_helper.rb