Permalink
Browse files

add in seed data for easy testing of dummy_app

  • Loading branch information...
1 parent 5892fe6 commit 7bda6fbe91b3902cb5e87ae9725be8055635ebab @jackdempsey jackdempsey committed with Sep 19, 2010
Showing with 14 additions and 0 deletions.
  1. +14 −0 spec/dummy_app/db/seeds.rb
View
@@ -5,3 +5,17 @@
#
# cities = City.create([{ :name => 'Chicago' }, { :name => 'Copenhagen' }])
# Mayor.create(:name => 'Daley', :city => cities.first)
+
+User.create(:email => 'test@test.com', :password => 'test1234', :password_confirmation => 'test1234')
+
+al = League.create!(:name => 'American')
+nl = League.create!(:name => 'National')
+
+east_al = Division.create!(:name => 'East', :league => al)
+east_nl = Division.create!(:name => 'East', :league => nl)
+
+west_al = Division.create!(:name => 'West', :league => al)
+west_nl = Division.create!(:name => 'West', :league => nl)
+
+Team.create!(:name => 'Red Sox', :manager => 'Jack Dempsey', :founded => 1900, :wins => 100, :losses => 0, :win_percentage => 100, :league => al, :division => east_al)
+Team.create!(:name => 'Yankees', :manager => 'Yogi Berra', :founded => 1900, :wins => 0, :losses => 100, :win_percentage => 0, :league => al, :division => east_al)

0 comments on commit 7bda6fb

Please sign in to comment.