Skip to content
This repository
Browse code

fix db/seeds.rb

  • Loading branch information...
commit ebd9f87e6130918665846ea2d2c63b2d9af4b33a 1 parent a9bec8a
Fabian Rodriguez authored October 03, 2012

Showing 1 changed file with 7 additions and 8 deletions. Show diff stats Hide diff stats

  1. 15  db/seeds.rb
15  db/seeds.rb
@@ -15,9 +15,9 @@
15 15
 require Rails.root.join('spec', 'helper_methods')
16 16
 include HelperMethods
17 17
 
18  
-alice = Factory(:user_with_aspect, :username => "alice", :password => 'evankorth')
19  
-bob   = Factory(:user_with_aspect, :username => "bob", :password => 'evankorth')
20  
-eve   = Factory(:user_with_aspect, :username => "eve", :password => 'evankorth')
  18
+alice = FactoryGirl.create(:user_with_aspect, :username => "alice", :password => 'evankorth')
  19
+bob   = FactoryGirl.create(:user_with_aspect, :username => "bob", :password => 'evankorth')
  20
+eve   = FactoryGirl.create(:user_with_aspect, :username => "eve", :password => 'evankorth')
21 21
 
22 22
 def url_hash(name)
23 23
   image_url = "/assets/user/#{name}.jpg"
@@ -41,8 +41,7 @@ def url_hash(name)
41 41
 connect_users(bob, bob.aspects.first, eve, eve.aspects.first)
42 42
 puts "done!"
43 43
 
44  
-print "making Bob an admin and beta... "
45  
-Role.add_beta(bob.person)
  44
+print "making Bob an admin... "
46 45
 Role.add_admin(bob.person)
47 46
 puts "done!"
48 47
 
@@ -58,9 +57,9 @@ def url_hash(name)
58 57
     if(n%3==1)
59 58
       post = u.post :status_message, :text => "#{u.username} - #{n} - #seeded", :to => u.aspects.first.id
60 59
     elsif(n%3==2)
61  
-      post =u.post(:reshare, :root_guid => Factory(:status_message, :public => true).guid, :to => 'all')
  60
+      post = u.post(:reshare, :root_guid => FactoryGirl.create(:status_message, :public => true).guid, :to => 'all')
62 61
     else
63  
-      post = Factory(:activity_streams_photo, :public => true, :author => u.person)
  62
+      post = FactoryGirl.create(:activity_streams_photo, :public => true, :author => u.person)
64 63
       u.add_to_streams(post, u.aspects)
65 64
     end
66 65
 
@@ -73,4 +72,4 @@ def url_hash(name)
73 72
 puts " done!"
74 73
 
75 74
 puts "Successfully seeded the db with users eve, bob, and alice (password: 'evankorth')"
76  
-puts ""
  75
+puts ""

0 notes on commit ebd9f87

Please sign in to comment.
Something went wrong with that request. Please try again.