spec/lol/summoner_request_spec.rb in ruby-lol-0.9.1 vs spec/lol/summoner_request_spec.rb in ruby-lol-0.9.3
- old
+ new
@@ -7,19 +7,19 @@
it "inherits from Request" do
expect(SummonerRequest.ancestors[1]).to eq(Request)
end
let(:request) { SummonerRequest.new "api_key", "euw" }
- let(:by_name) { load_fixture("summoner-by-name", "v1.1", "get") }
- let(:name) { load_fixture("summoner-name", "v1.1", "get") }
- let(:summoner) { load_fixture("summoner", "v1.1", "get") }
- let(:runes) { load_fixture("summoner-runes", "v1.1", "get") }
- let(:masteries) { load_fixture("summoner-masteries", "v1.1", "get") }
+ let(:by_name) { load_fixture("summoner-by-name", SummonerRequest.api_version, "get") }
+ let(:name) { load_fixture("summoner-name", SummonerRequest.api_version, "get") }
+ let(:summoner) { load_fixture("summoner", SummonerRequest.api_version, "get") }
+ let(:runes) { load_fixture("summoner-runes", SummonerRequest.api_version, "get") }
+ let(:masteries) { load_fixture("summoner-masteries", SummonerRequest.api_version, "get") }
describe "#by_name" do
subject do
- expect(request.class).to receive(:get).with(request.api_url("v1.1", "summoner/by-name/foo")).and_return(by_name)
+ expect(request.class).to receive(:get).with(request.api_url("summoner/by-name/foo")).and_return(by_name)
request.by_name "foo"
end
it "returns a summoner" do
@@ -27,11 +27,11 @@
end
end
describe "#name" do
subject do
- expect(request.class).to receive(:get).with(request.api_url("v1.1", "summoner/foo,bar/name")).and_return(name)
+ expect(request.class).to receive(:get).with(request.api_url("summoner/foo,bar/name")).and_return(name)
request.name "foo", "bar"
end
it "returns an array of hashes" do
@@ -39,11 +39,11 @@
end
end
describe "#get" do
subject do
- expect(request.class).to receive(:get).with(request.api_url("v1.1", "summoner/foo")).and_return(summoner)
+ expect(request.class).to receive(:get).with(request.api_url("summoner/foo")).and_return(summoner)
request.get "foo"
end
it "returns a summoners" do
@@ -51,11 +51,11 @@
end
end
describe "#runes" do
subject do
- expect(request.class).to receive(:get).with(request.api_url("v1.1", "summoner/foo/runes")).and_return(runes)
+ expect(request.class).to receive(:get).with(request.api_url("summoner/foo/runes")).and_return(runes)
request.runes "foo"
end
it "returns an array of RunePage" do
@@ -63,10 +63,10 @@
end
end
describe "#masteries" do
subject do
- expect(request.class).to receive(:get).with(request.api_url("v1.1", "summoner/foo/masteries")).and_return(masteries)
+ expect(request.class).to receive(:get).with(request.api_url("summoner/foo/masteries")).and_return(masteries)
request.masteries "foo"
end
it "returns an array of MasteryPage" do