test/test_goals.rb in sportdb-1.9.8 vs test/test_goals.rb in sportdb-1.9.9

- old
+ new

@@ -7,11 +7,11 @@ # rake -I ./lib test require 'helper' -class TestGoals < MiniTest::Unit::TestCase +class TestGoals < MiniTest::Test def setup WorldDb.delete! SportDb.delete! ## SportDb.read_builtin @@ -67,34 +67,34 @@ end end def test_world_cup_1930 - teamreader = TeamReader.new( SportDb.test_data_path ) - teamreader.read( 'world-cup/teams_1930' ) + teamreader = TestTeamReader.from_file( 'world-cup/teams_1930' ) + teamreader.read() assert_equal 13, Team.count - seasonreader = SeasonReader.new( SportDb.test_data_path ) - seasonreader.read( 'world-cup/seasons_1930') + seasonreader = TestSeasonReader.from_file( 'world-cup/seasons_1930' ) + seasonreader.read() assert_equal 1, Season.count y = Season.find_by_key!( '1930' ) assert_equal '1930', y.title - leaguereader = LeagueReader.new( SportDb.test_data_path ) - leaguereader.read( 'world-cup/leagues' ) + leaguereader = TestLeagueReader.from_file( 'world-cup/leagues' ) + leaguereader.read() assert_equal 1, League.count l = League.find_by_key!( 'world' ) assert_equal 'World Cup', l.title - gamereader = GameReader.new( SportDb.test_data_path ) - gamereader.read( 'world-cup/1930/cup_goals' ) + gamereader = TestGameReader.from_file( 'world-cup/1930/cup_goals' ) + gamereader.read() assert_equal 1, Event.count w = Event.find_by_key!( 'world.1930' )