Sha256: 15e7ed3f9a9b2468cdcbc5f5f0c1a3440370ddb862ac5b3248376648c9ae8369

Contents?: true

Size: 572 Bytes

Versions: 15

Compression:

Stored size: 572 Bytes

Contents

require "spec_helper"
require "lol"

include Lol

describe LeagueRequest do
  it "inherits from Request" do
    expect(LeagueRequest.ancestors[1]).to eq(Request)
  end

  describe "#get" do
    let(:request) { LeagueRequest.new "api_key", "euw" }

    subject do
      expect(request.class).to receive(:get).with(request.api_url("league/by-summoner/123")).and_return(load_fixture("league", LeagueRequest.api_version, "get"))

      request.get(123)
    end

    it "returns an array of Leagues" do
      expect(subject.map(&:class).uniq).to eq([League])
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
ruby-lol-0.9.17 spec/lol/league_request_spec.rb
ruby-lol-0.9.16 spec/lol/league_request_spec.rb
ruby-lol-0.9.15 spec/lol/league_request_spec.rb
ruby-lol-0.9.14 spec/lol/league_request_spec.rb
ruby-lol-0.9.13 spec/lol/league_request_spec.rb
ruby-lol-0.9.12 spec/lol/league_request_spec.rb
ruby-lol-0.9.11 spec/lol/league_request_spec.rb
ruby-lol-0.9.10 spec/lol/league_request_spec.rb
ruby-lol-0.9.9 spec/lol/league_request_spec.rb
ruby-lol-0.9.8 spec/lol/league_request_spec.rb
ruby-lol-0.9.7 spec/lol/league_request_spec.rb
ruby-lol-0.9.6 spec/lol/league_request_spec.rb
ruby-lol-0.9.5 spec/lol/league_request_spec.rb
ruby-lol-0.9.4 spec/lol/league_request_spec.rb
ruby-lol-0.9.3 spec/lol/league_request_spec.rb