scenarios/bootstrap.rb
# A singleton that creates some users:
A singleton that creates some users.
A singleton that creates some users .
def bootstrap_users
  @@bootstrap_users ||= []
  return @@bootstrap_users unless @@bootstrap_users.length == 0
  12.times do
    u = User.gen
    @@bootstrap_users << u
    u.build_watch_collection
  end
  return @@bootstrap_users
end
def bootstrap_users @@bootstrap_users ||= [ ] return @@bootstrap_users unless @@bootstrap_users . length == 0 12 . times do u = User . gen @@bootstrap_users << u u . build_watch_collection end return @@bootstrap_users end
A singleton that creates some users:
A singleton that creates some users :