Sqlite Database Doesn't "Reset" -


i have rspec file runs following method before , after each "describe" test block:

  def self.reset     commands = [       "del #{cats_db_file}", #the "del" changed "rm" windows       "cat #{cats_sql_file} > sqlite3 #{cats_db_file}" # | used before (pipe in linux)     ]      commands.each { |command| `#{command}` }     dbconnection.open(cats_db_file)   end 

i'm running of in windows command line. reason, database overpopulates repeatedly; seems database doesn't "clear" itself, when test block run, same attributes added again. syntax in commands array above okay? kind of new this, appreciate suggestions!


Comments

Popular posts from this blog

python - TypeError: start must be a integer -

c# - DevExpress RepositoryItemComboBox BackColor property ignored -

django - Creating multiple model instances in DRF3 -