Sha256: 3eaf54e3c8af24a186113fa1e13dc4a21edb5ae55bea06410e9257b2366d489c

Contents?: true

Size: 978 Bytes

Versions: 3

Compression:

Stored size: 978 Bytes

Contents

# => {"primaryRace"=>"PROTOSS", "terranWins"=>0, "protossWins"=>0, "zergWins"=>0, "highest1v1Rank"=>"DIAMOND",

require 'spec_helper'

describe Bnet::Starcraft2::Career  do
  describe '.from_api(args)' do
    subject { described_class.from_api(args) }
    let(:args) do
      {
        'primaryRace'     => 'PROTOSS',
        'terranWins'      => 1,
        'protosswins'     => 3,
        'zergWins'        => 0,
        'highest1v1Rank'  => "DIAMOND",
        'highestTeamRank' => "MASTER",
        "seasonTotalGames" => 0,
        "careerTotalGames" => 780
      }
    end


    it "returns an instance" do
      expect(subject).to be_a_kind_of(described_class)
      expect(subject).to have_attributes(
        primary_race: 'PROTOSS',
        terran_wins: 1,
        protoss_wins: 3,
        zerg_wins: 0,
        highest_1v1_rank: 'DIAMOND',
        highest_team_rank: 'MASTER',
        season_total_games: 0,
        career_total_games: 780
      )
    end
  end

end



Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
bnet-0.0.10 spec/bnet/starcraft2/career_spec.rb
bnet-0.0.5 spec/bnet/starcraft2/career_spec.rb
bnet-0.0.4 spec/bnet/starcraft2/career_spec.rb