Sha256: c58f95410a6fc3cb61c41fc4362aafbfb5e84881072c3aa397dd3d951b244046

Contents?: true

Size: 440 Bytes

Versions: 2

Compression:

Stored size: 440 Bytes

Contents

require 'ap'
require 'factory_girl'
require 'faker'
require 'database_cleaner'

DatabaseCleaner.strategy = :truncation
Dir[File.expand_path("../../../factories/*.rb", __FILE__)].each  {|f| require f }

DatabaseCleaner.clean

FactoryGirl.create(:user, :username => 'r.z', :password => 'pwd', :role => 'admin')

10.times do
  user = FactoryGirl.create(:user)
  (1..100).to_a.sample.times { FactoryGirl.create(:article, :author => user) }
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
cargo_wiki-1.0.1 spec/dummy/db/seeds.rb
cargo_wiki-1.0.0 spec/dummy/db/seeds.rb