Module: Specjour::DbScrub

Extended by:
DbScrub
Included in:
DbScrub
Defined in:
lib/specjour/db_scrub.rb

Instance Method Summary collapse

Instance Method Details

#scrubObject



9
10
11
12
13
14
15
16
17
# File 'lib/specjour/db_scrub.rb', line 9

def scrub
  connect_to_database
  if pending_migrations?
    puts "Migrating schema for database #{ENV['TEST_ENV_NUMBER']}..."
    Rake::Task['db:test:load'].invoke
  else
    purge_tables
  end
end