Sha256: 645b90fb66d13e99b1b1f49bdfa188ce57b8e3bf99e067fd9e214696e4561400
Contents?: true
Size: 872 Bytes
Versions: 3
Compression:
Stored size: 872 Bytes
Contents
require 'spec_helper' describe SodaXmlTeam do subject { SodaXmlTeam::Standings } describe '.parse_standings' do let(:input) { SodaXmlTeam::Client.new(ENV['SODA_USERNAME'], ENV['SODA_PASSWORD']).get_document({ sandbox: true, document_id: 'xt.10878197-standings' }) } let(:output) { subject.parse_standings(input) } it 'has a division name' do expect(output[0][:division]).to eq 'Atlantic Division' end it 'has a conference name' do expect(output[0][:conference]).to eq 'Eastern' end it 'has five teams in the division' do expect(output[0][:teams].length).to eq 5 end it 'has a team name' do expect(output[0][:teams][0][:name]).to eq 'New Jersey Devils' end it 'has a record of 10 wins' do expect(output[0][:teams][0]['wins']).to eq 37 end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
soda_xml_team-1.3.1 | spec/soda_xml_team_standings_spec.rb |
soda_xml_team-1.3.0 | spec/soda_xml_team_standings_spec.rb |
soda_xml_team-1.2.0 | spec/soda_xml_team_standings_spec.rb |