Commit 324d6584e1fa16c8bef05372a371cb3566329ac2
1 parent
f6ce7efe
Exists in
master
and in
1 other branch
Update errbit:demo task to use Fabricator instead of factory_girl (which is no l…
…onger used in the project)
Showing
1 changed file
with
3 additions
and
5 deletions
Show diff stats
lib/tasks/errbit/demo.rake
... | ... | @@ -2,10 +2,8 @@ namespace :errbit do |
2 | 2 | |
3 | 3 | desc "Add a demo app & errors to your database (for testing)" |
4 | 4 | task :demo => :environment do |
5 | - require 'factory_girl_rails' | |
6 | - | |
7 | - Dir.glob(File.join(Rails.root, 'spec/factories/*.rb')).each {|f| require f } | |
8 | - app = Factory(:app, :name => "Demo App #{Time.now.strftime("%N")}") | |
5 | + | |
6 | + app = Fabricate(:app, :name => "Demo App #{Time.now.strftime("%N")}") | |
9 | 7 | |
10 | 8 | # Report a number of errors for the application |
11 | 9 | app.problems.delete_all |
... | ... | @@ -62,7 +60,7 @@ namespace :errbit do |
62 | 60 | end |
63 | 61 | |
64 | 62 | |
65 | - Factory(:notice, :err => Factory(:err, :problem => Factory(:problem, :app => app))) | |
63 | + Fabricate(:notice, :err => Fabricate(:err, :problem => Fabricate(:problem, :app => app))) | |
66 | 64 | puts "=== Created demo app: '#{app.name}', with example errors." |
67 | 65 | end |
68 | 66 | ... | ... |