Sha256: 633d638e9f73b15a013ee11a4b92f3336ddb2356346e1d32e16137051878068a
Contents?: true
Size: 685 Bytes
Versions: 9
Compression:
Stored size: 685 Bytes
Contents
ENV['RACK_ENV'] = 'test' ENV['SHOPIFY_REDIRECT_URI'] = 'http://localhost:4567' ENV['SECRET'] = 'secret' require 'minitest/autorun' require 'rack/test' require 'mocha/setup' require 'fakeweb' FakeWeb.allow_net_connect = false module Helpers include Rack::Test::Methods def load_fixture(name) File.read("./test/fixtures/#{name}") end def fake(url, options = {}) method = options.delete(:method) || :get body = options.delete(:body) || '{}' format = options.delete(:format) || :json FakeWeb.register_uri(method, url, { body: body, status: 200, content_type: "application/#{format}" }.merge(options)) end end class Minitest::Test include Helpers end
Version data entries
9 entries across 9 versions & 1 rubygems