Sha256: 885f0677004a1649540fa750eed626a8022900d1bbc4138c018ef4c741040661
Contents?: true
Size: 1.18 KB
Versions: 4
Compression:
Stored size: 1.18 KB
Contents
require 'spec_helper' describe SportsDataApi::Ncaamb::Season, vcr: { cassette_name: 'sports_data_api_ncaamb_season', record: :new_episodes, match_requests_on: [:host, :path] } do subject { SportsDataApi::Ncaamb::Season } describe '.season?' do context :CT do it { SportsDataApi::Ncaamb::Season.valid?(:CT).should be_true } end context :REG do it { subject.valid?(:REG).should be_true } end context :PST do it { subject.valid?(:PST).should be_true } end context :ct do it { subject.valid?(:ct).should be_false } end context :reg do it { subject.valid?(:reg).should be_false } end context :pst do it { subject.valid?(:pst).should be_false } end end context 'results from schedule fetch' do let(:season) do SportsDataApi.set_access_level(:ncaamb, 't') SportsDataApi.set_key(:ncaamb, api_key(:ncaamb)) SportsDataApi::Ncaamb.schedule(2014, :reg) end subject { season } it { should be_an_instance_of(SportsDataApi::Ncaamb::Season) } its(:year) { should eq 2014 } its(:type) { should eq :REG } its(:games) { should have(5512).games } end end
Version data entries
4 entries across 4 versions & 1 rubygems