Module: Specjour::DbScrub

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

Instance Method Summary collapse

Instance Method Details

#scrubObject



6
7
8
9
10
11
12
13
14
# File 'lib/specjour/db_scrub.rb', line 6

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