Commit 75adfadcfba9a7afc0de06469666511639923718
1 parent
0e198802
Exists in
master
and in
1 other branch
Added a small rake task to add a demo app & error to your database (for testing)
Showing
2 changed files
with
13 additions
and
1 deletions
Show diff stats
Gemfile
... | ... | @@ -20,16 +20,17 @@ end |
20 | 20 | group :development, :test do |
21 | 21 | gem 'rspec-rails', '~> 2.5' |
22 | 22 | gem 'webmock', :require => false |
23 | + gem 'factory_girl_rails' | |
23 | 24 | #gem 'ruby-debug19', :require => 'ruby-debug' |
24 | 25 | end |
25 | 26 | |
26 | 27 | group :test do |
27 | 28 | gem 'rspec', '~> 2.5' |
28 | 29 | gem 'database_cleaner', '~> 0.6.0' |
29 | - gem 'factory_girl_rails' | |
30 | 30 | gem 'email_spec' |
31 | 31 | end |
32 | 32 | |
33 | 33 | group :heroku do |
34 | 34 | gem 'thin' |
35 | 35 | end |
36 | + | ... | ... |
... | ... | @@ -0,0 +1,11 @@ |
1 | +namespace :errbit do | |
2 | + desc "Add a demo app & error to your database (for testing)" | |
3 | + task :demo => :environment do | |
4 | + require 'factory_girl_rails' | |
5 | + Dir.glob(File.join(Rails.root,'spec/factories/*.rb')).each {|f| require f } | |
6 | + app = Factory(:app, :name => "Demo App #{Time.now.strftime("%N")}") | |
7 | + Factory(:notice, :err => Factory(:err, :app => app)) | |
8 | + puts "=== Created demo app: '#{app.name}', with an example error." | |
9 | + end | |
10 | +end | |
11 | + | ... | ... |