Sha256: 1594f457a253584c691799673a7c94882ab8df1b35775e824e46961b5b1d5efc
Contents?: true
Size: 759 Bytes
Versions: 1
Compression:
Stored size: 759 Bytes
Contents
require "spec_helper" require "lol" include Lol describe GameRequest do it "inherits from Request" do expect(GameRequest.ancestors[1]).to eq(Request) end describe "#recent" do let(:request) { GameRequest.new "api_key", "euw" } subject do expect(request.class).to receive(:get).with(request.api_url('v1.1', "game/by-summoner/1/recent")).and_return load_fixture('game', 'v1.1', 'get') request.recent 1 end it 'returns an array' do expect(subject).to be_a Array end it 'returns an array of Games' do expect(subject.map(&:class).uniq).to eq [Game] end it 'fetches games from the API' do expect(subject.size).to eq load_fixture('game', 'v1.1', 'get')['games'].size end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
ruby-lol-0.0.7 | spec/lol/game_request_spec.rb |