Sha256: 7ea9df655a94d9e0456c7483f22fbb4e5cbb695ab08522bacc3346e34811a121
Contents?: true
Size: 817 Bytes
Versions: 10
Compression:
Stored size: 817 Bytes
Contents
require "spec_helper" require "lol" include Lol describe ChampionRequest do it "inherits from Request" do expect(ChampionRequest.ancestors[1]).to eq(Request) end describe "get" do let(:request) { ChampionRequest.new "api_key", "euw" } subject do expect(request).to receive(:perform_request).with(request.api_url("champion")).and_return(load_fixture("champion", ChampionRequest.api_version, "get")) request.get end it "returns an array" do expect(subject).to be_a(Array) end it "returns an array of champions" do expect(subject.map {|e| e.class}.uniq).to eq([Champion]) end it "fetches champions from the API" do expect(subject.size).to eq(load_fixture("champion", ChampionRequest.api_version, "get")["champions"].size) end end end
Version data entries
10 entries across 10 versions & 1 rubygems