1 $LOAD_PATH.unshift(File.expand_path('../../lib', __FILE__))
6 require 'faraday/adapter/test'
11 if app.kind_of?(Faraday::Adapter::Test)
12 app.stubs.verify_stubbed_calls
14 raise TypeError, "Expected test adapter"
20 module ConnectionHelpers
21 def stub_connection(&block)
22 stubs = Faraday::Adapter::Test::Stubs.new do |stub|
25 connection = Faraday.new do |builder|
26 builder.adapter(:test, stubs)
33 def initialize(expected)
34 @expected = JSON.parse(expected)
37 @target = JSON.parse(target)
38 @target.eql?(@expected)
41 "expected #{@target.inspect} to be #{@expected}"
43 def negative_failure_message
44 "expected #{@target.inspect} not to be #{@expected}"
49 EqualsJson.new(expected)
53 RSpec.configure do |config|