Module: Sparkey::Testing

Defined in:
lib/sparkey/testing.rb

Instance Method Summary collapse

Instance Method Details

#delete(filename) ⇒ Object


8
9
10
11
12
13
14
# File 'lib/sparkey/testing.rb', line 8

def delete(filename)
  log_file = "#{filename}.spl"
  index_file = "#{filename}.spi"

  File.delete(log_file)   if File.exists?(log_file)
  File.delete(index_file) if File.exists?(index_file)
end

#random_filenameObject


4
5
6
# File 'lib/sparkey/testing.rb', line 4

def random_filename
  "test-#{SecureRandom.hex(16)}"
end