Sha256: 786dc4de8fb1e39255fecd7bc8b6fabfecada3c8b0bc1c8b3f4d4625580b828c

Contents?: true

Size: 768 Bytes

Versions: 14

Compression:

Stored size: 768 Bytes

Contents

require "spec_helper"
require "lol"

include Lol

describe TeamStatistic do
  it_behaves_like 'Lol model' do
    let(:valid_attributes) { { losses: 1 } }
  end

  %w(full_id average_games_played losses max_rating rating seed_rating team_stat_type wins).each do |attribute|
    describe "#{attribute} attribute" do
      it_behaves_like 'plain attribute' do
        let(:attribute) { attribute }
        let(:attribute_value) { 'asd' }
      end
    end
  end

  describe 'team_id attribute' do
    it_behaves_like 'plain attribute' do
      let(:attribute) { 'team_id' }
      let(:attribute_value) { 'asd' }
    end

    it 'parses the value if it is an Hash' do
      model = Team.new team_id: { 'fullId' => 1 }
      expect(model.team_id).to eq 1
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

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