describe GameSystem::Client do
def client
GameSystem::Client.new(signature_method: 'HMAC-SHA1', oauth_key: 'kk', oauth_secret: 'bb', oauth_access_token_url: 'https:://localhost')
end
before :each do
WebMock.reset!
end
describe 'response' do
context 'wrong path' do
it 'raises JSON::ParserError on invalid return value' do
stub_request(:get,"https://games.com/game_id/invalid_id").to_return(:status => 200, :body => 'invalid json', :headers => {})
Rails.logger.info "#{client.games_by_id("invalid_id")}"
end
end
end
end
谁能让我知道我做错了什么或者我可以做些什么不同的事情?
它基本上会在该行抛出此错误
@access_token = @consumer.get_access_token(nil)
在我的客户