Sha256: bffc54b114282762409ec451bb82f7d6f565e4cc4a80b7392bf7e9b24d3fb8f3
Contents?: true
Size: 753 Bytes
Versions: 2
Compression:
Stored size: 753 Bytes
Contents
module ShopifyAPI module Mock class Response class << self def register(method, resource, response) FakeWeb.register_uri( method, /#{SHOPIFY_MOCK_SHOP_BASE_URL}#{resource}/, :body => response ) end def register_all count_fixture = ShopifyAPI::Mock::Fixtures.read(:count) ShopifyAPI::Mock::Fixtures.all.each do |fixture| ShopifyAPI::Mock::Response.register(:get, "#{fixture.to_s}/count.json", count_fixture) ShopifyAPI::Mock::Response.register( :get, "#{fixture.to_s}.json", ShopifyAPI::Mock::Fixtures.read(fixture) ) end end end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
shopify-mock-0.0.3 | lib/shopify-mock/response.rb |
shopify-mock-0.0.2 | lib/shopify-mock/response.rb |