Permalink
Browse files

fix db/seeds.rb

  • Loading branch information...
1 parent a9bec8a commit ebd9f87e6130918665846ea2d2c63b2d9af4b33a @fabianrbz fabianrbz committed Oct 3, 2012
Showing with 7 additions and 8 deletions.
  1. +7 −8 db/seeds.rb
View
@@ -15,9 +15,9 @@
require Rails.root.join('spec', 'helper_methods')
include HelperMethods
-alice = Factory(:user_with_aspect, :username => "alice", :password => 'evankorth')
-bob = Factory(:user_with_aspect, :username => "bob", :password => 'evankorth')
-eve = Factory(:user_with_aspect, :username => "eve", :password => 'evankorth')
+alice = FactoryGirl.create(:user_with_aspect, :username => "alice", :password => 'evankorth')
+bob = FactoryGirl.create(:user_with_aspect, :username => "bob", :password => 'evankorth')
+eve = FactoryGirl.create(:user_with_aspect, :username => "eve", :password => 'evankorth')
def url_hash(name)
image_url = "/assets/user/#{name}.jpg"
@@ -41,8 +41,7 @@ def url_hash(name)
connect_users(bob, bob.aspects.first, eve, eve.aspects.first)
puts "done!"
-print "making Bob an admin and beta... "
-Role.add_beta(bob.person)
+print "making Bob an admin... "
Role.add_admin(bob.person)
puts "done!"
@@ -58,9 +57,9 @@ def url_hash(name)
if(n%3==1)
post = u.post :status_message, :text => "#{u.username} - #{n} - #seeded", :to => u.aspects.first.id
elsif(n%3==2)
- post =u.post(:reshare, :root_guid => Factory(:status_message, :public => true).guid, :to => 'all')
+ post = u.post(:reshare, :root_guid => FactoryGirl.create(:status_message, :public => true).guid, :to => 'all')
else
- post = Factory(:activity_streams_photo, :public => true, :author => u.person)
+ post = FactoryGirl.create(:activity_streams_photo, :public => true, :author => u.person)
u.add_to_streams(post, u.aspects)
end
@@ -73,4 +72,4 @@ def url_hash(name)
puts " done!"
puts "Successfully seeded the db with users eve, bob, and alice (password: 'evankorth')"
-puts ""
+puts ""

0 comments on commit ebd9f87

Please sign in to comment.