spec/api/game_spec.rb in triviacrack-0.4.0 vs spec/api/game_spec.rb in triviacrack-0.5.0
- old
+ new
@@ -3,13 +3,13 @@
describe TriviaCrack::API::Game do
let(:session) { TriviaCrack::Session.new session_id: "session", user_id: 1 }
let(:client) { (Class.new(APIStub) { include TriviaCrack::API::Game }).new session }
- let(:response) { double(code: code, body: raw_data) }
+ let(:response) { double(status: code, body: raw_data) }
- before { allow(Unirest).to receive(:get) { response } }
- before { allow(Unirest).to receive(:post) { response } }
+ before { allow(Faraday).to receive(:get) { response } }
+ before { allow(Faraday).to receive(:post) { response } }
describe "#get_games" do
subject { client.get_games[3] }