Skip to content

Instantly share code, notes, and snippets.

@mdeiters
Created April 26, 2010 13:53
Show Gist options
  • Save mdeiters/379354 to your computer and use it in GitHub Desktop.
Save mdeiters/379354 to your computer and use it in GitHub Desktop.
require 'test_helper'
class GameTest < ActiveSupport::TestCase
test 'that a team can be assigned to the game home team' do
liverpool = Team.create!(:name => 'Liverpool')
chelsea = Team.create!(:name => 'Chelsea')
upcoming_game = Game.create!(:home_team => liverpool, :away_team => chelsea)
assert_equal upcoming_game.home_team, liverpool
assert_equal upcoming_game.away_team, chelsea
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment