Sha256: a4073f82a9985bf0fcdbedc699516f8258538c235b1d3c1f3dd6f5f08ec1ef97

Contents?: true

Size: 747 Bytes

Versions: 11

Compression:

Stored size: 747 Bytes

Contents

require "spec_helper"
require "lol"

include Lol

describe League do
  it "inherits from Lol::Model" do
    expect(League.ancestors[1]).to eq(Model)
  end

  context "initialization" do
    it_behaves_like 'Lol model' do
      let(:valid_attributes) { { name: 'foo' } }
    end

    %w(name tier queue participant_id).each do |attribute|
      describe "#{attribute} attribute" do
        it_behaves_like 'plain attribute' do
          let(:attribute) { attribute }
          let(:attribute_value) { 'asd' }
        end
      end
    end

    it "fills entries with LeagueEntry objects" do
      league = League.new(load_fixture("league", "v2.3", "get").first)
      expect(league.entries.map(&:class).uniq).to eq([LeagueEntry])
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
ruby-lol-0.9.17 spec/lol/league_spec.rb
ruby-lol-0.9.16 spec/lol/league_spec.rb
ruby-lol-0.9.15 spec/lol/league_spec.rb
ruby-lol-0.9.14 spec/lol/league_spec.rb
ruby-lol-0.9.13 spec/lol/league_spec.rb
ruby-lol-0.9.12 spec/lol/league_spec.rb
ruby-lol-0.9.11 spec/lol/league_spec.rb
ruby-lol-0.9.10 spec/lol/league_spec.rb
ruby-lol-0.9.9 spec/lol/league_spec.rb
ruby-lol-0.9.8 spec/lol/league_spec.rb
ruby-lol-0.9.7 spec/lol/league_spec.rb