1 $LOAD_PATH.unshift(File.expand_path('../../lib', __FILE__))
10 if app.kind_of?(Faraday::Adapter::Test)
11 app.stubs.verify_stubbed_calls
13 raise TypeError, "Expected test adapter"
19 module ConnectionHelpers
20 def stub_connection(&block)
21 stubs = Faraday::Adapter::Test::Stubs.new do |stub|
24 connection = Faraday.new do |builder|
25 builder.adapter(:test, stubs)
32 def initialize(expected)
33 @expected = JSON.parse(expected)
36 @target = JSON.parse(target)
37 @target.eql?(@expected)
40 "expected #{@target.inspect} to be #{@expected}"
42 def negative_failure_message
43 "expected #{@target.inspect} not to be #{@expected}"
48 EqualsJson.new(expected)
52 RSpec.configure do |config|