Sha256: aec8d07b01d6b5c164ed60349ac4ce052f975a6b7248e0cf6e80fcdd124c69d9

Contents?: true

Size: 879 Bytes

Versions: 3

Compression:

Stored size: 879 Bytes

Contents

require 'spec_helper'

describe SportsDataApi::Ncaafb::Season, vcr: {
    cassette_name: 'sports_data_api_ncaafb_season',
    record: :new_episodes,
    match_requests_on: [:host, :path]
} do
  subject { SportsDataApi::Ncaafb::Season }
  describe '.season?' do

    context :REG do
      it { subject.valid?(:REG).should be_true }
    end
    context :reg do
      it { subject.valid?(:reg).should be_false }
    end
  end

  context 'results from schedule fetch' do
      let(:season) do
        SportsDataApi.set_access_level(:ncaafb, 't')
        SportsDataApi.set_key(:ncaafb, api_key(:ncaafb))
        SportsDataApi::Ncaafb.schedule(2014, :REG)
      end
      subject { season }
      it { should be_an_instance_of(SportsDataApi::Ncaafb::Season) }
      its(:year) { should eq 2014 }
      its(:type) { should eq :REG }
      its(:weeks) { should have(21).weeks }
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
sports_data_api-0.2.4 spec/lib/sports_data_api/ncaafb/season_spec.rb
sports_data_api-0.2.3 spec/lib/sports_data_api/ncaafb/season_spec.rb
sports_data_api-0.2.2 spec/lib/sports_data_api/ncaafb/season_spec.rb