Sha256: e8f2542ccca17a119603f650e90888b4a2403e11bd4925ae4007c9c40ff4096d
Contents?: true
Size: 631 Bytes
Versions: 3
Compression:
Stored size: 631 Bytes
Contents
ENV['RACK_ENV'] = 'test' 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
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
shopify-sinatra-app-0.6.0 | example/test/test_helper.rb |
shopify-sinatra-app-0.1.5 | lib/generator/test/test_helper.rb |
shopify-sinatra-app-0.1.4 | lib/generator/test/test_helper.rb |