Sha256: 8fe3e906d5bc181738bd714740ef269bd887f8e1e6898895d29b525cf1a4784b
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.2', "game/by-summoner/1/recent")).and_return load_fixture('game', 'v1.2', '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.9.1 | spec/lol/game_request_spec.rb |