Skip to content

Instantly share code, notes, and snippets.

@alexrothenberg
Created April 23, 2010 07:00
Show Gist options
  • Save alexrothenberg/376289 to your computer and use it in GitHub Desktop.
Save alexrothenberg/376289 to your computer and use it in GitHub Desktop.
# test/unit/team_test.rb
require File.join(File.expand_path(File.dirname(__FILE__)), '..', 'test_helper')
class TeamTest < ActiveSupport::TestCase
test 'can save a team in the database' do
team = Team.new(:name => 'Liverpool')
team.save!
team_from_database = Team.find(team.id)
assert_equal team, team_from_database
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment