Sha256: e7980be357f4de5ca8ec71f81bab6bb6ee39c5976f7cf13f49fa298894a5ce38
Contents?: true
Size: 1.11 KB
Versions: 3
Compression:
Stored size: 1.11 KB
Contents
# encoding: utf-8 ### # to run use # ruby -I ./lib -I ./test test/test_standings_ii.rb # or better # rake -I ./lib test require 'helper' class TestStandingsIi < MiniTest::Unit::TestCase def setup WorldDb.delete! SportDb.delete! SportDb.read_builtin end def test_bl at = Country.create!( key: 'at', name: 'Austria', code: 'AUT', pop: 1, area: 1) teamreader = TeamReader.new( SportDb.test_data_path ) teamreader.read( 'at-austria/teams', country_id: at.id ) leaguereader = LeagueReader.new( SportDb.test_data_path ) leaguereader.read( 'at-austria/leagues', country_id: at.id ) gamereader = GameReader.new( SportDb.test_data_path ) ## check/fix: is country_id more_attribs needed? why? why not? gamereader.read( 'at-austria/2013_14/bl', country_id: at.id ) bl = Event.find_by_key!( 'at.2013/14' ) assert_equal 10, bl.teams.count assert_equal 36, bl.rounds.count assert_equal 180, bl.games.count # 36x5 = 180 standings = SportDb::Standings.new standings.update( bl.games ) pp standings.to_a end end # class TestStandingsIi
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
sportdb-1.9.8 | test/test_standings_ii.rb |
sportdb-1.9.7 | test/test_standings_ii.rb |
sportdb-1.9.6 | test/test_standings_ii.rb |