Sha256: da72dce70bebfa807659a884ab476e2695a8603aa0c20b5be8521828e6b3628c

Contents?: true

Size: 705 Bytes

Versions: 2

Compression:

Stored size: 705 Bytes

Contents

# encoding: utf-8

###
#  to run use
#     ruby -I ./lib -I ./test test/test_match.rb


require 'helper'

class TestMatch < MiniTest::Test

  Match = SportDb::Import::Match


  def test_round
    m = Match.new( team1: 'Team 1',
                   team2: 'Team 2',
                   round: 3 )
    pp m
    assert_equal 3, m.round
    assert_nil      m.score1
    assert_nil      m.score2

    m = Match.new
    m.update( round: 4 )
    pp m
    assert_equal 4, m.round

    m = Match.create( team1: 'Team 1',
                      team2: 'Team 2',
                      round: 5 )
    pp m
    assert_equal 5, m.round
  end  # method test_round

end # class TestMatch

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
sportdb-formats-0.4.0 test/test_match.rb
sportdb-formats-0.3.0 test/test_match.rb