Sha256: 8c7012a5ec598e553ad745ac704107058bb96c8615b42e0b943552d58efc3275
Contents?: true
Size: 752 Bytes
Versions: 1
Compression:
Stored size: 752 Bytes
Contents
# encoding: utf-8 require 'rubygems' require 'haruna' def create_stub_connection stubs = Faraday::Adapter::Test::Stubs.new do |stub| # stub.post(url) { [status_code, response_header, response_body] } stub.post('/kcsapi/get_seafood/tamago') {[ 200, {}, 'egg' ]} stub.post('/kcsapi/get_seafood/ebi') {[ 200, {}, 'shrimp' ]} stub.post('/kcsapi/get_seafood/uni') {[ 200, {}, 'urchin' ]} stub.post('/kcsapi/api_req_mission/start') {[ 200, {}, 'ok' ]} stub.post('/kcsapi/api_req_mission/result') {[ 200, {}, 'ok' ]} stub.post('/kcsapi/api_req_hokyu/charge') {[ 200, {}, 'ok' ]} stub.post('/kcsapi/api_get_member/deck_port') {[ 200, {}, 'ok' ]} end Faraday.new do |builder| builder.adapter :test, stubs end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
haruna-0.0.1.2 | spec/spec_helper.rb |