Sha256: bf26ae204efe11e90d6f60d5679fb2b544b632eabcc204670474d952b98ec583
Contents?: true
Size: 987 Bytes
Versions: 18
Compression:
Stored size: 987 Bytes
Contents
require 'spec_helper' describe SportsDataApi::Golf::Pairing do let(:data) { { 'tee_time' => '2015-04-10T11:45:00+00:00', 'back_nine' => false, 'players' => [ { 'first_name' => 'Ian', 'last_name' => 'Woosnam', 'country' => 'WALES', 'id' => 'f7f29a09-7e04-4d72-9e83-137f502b056f' }, { 'first_name' => 'Erik', 'last_name' => 'Compton', 'country' => 'UNITED STATES', 'id' => '3f463f9f-12da-4896-b7e3-e1a2c9ae69a9' } ] } } subject { SportsDataApi::Golf::Pairing.new(data) } its(:tee_time) { should eq(DateTime.new(2015, 4, 10, 11, 45)) } its(:back_nine) { should eq(false) } it '#players parses players' do expect(subject.players.length).to eq 2 player = subject.players.first expect(player).to be_an_instance_of(SportsDataApi::Golf::Player) expect(player[:id]).to eq 'f7f29a09-7e04-4d72-9e83-137f502b056f' end end
Version data entries
18 entries across 18 versions & 1 rubygems