Sha256: edf76c21fce2be30eb6284a0341b7200fd4f71bcdac74cfcd10f482a2854084e

Contents?: true

Size: 602 Bytes

Versions: 49

Compression:

Stored size: 602 Bytes

Contents

RSpec.shared_context 'metasploit_credential_importer_zip_file' do
  #
  # Methods
  #

  def remove_metasploit_credential_importer_zip_files
    # Using POSIX filepath here b/c we don't care about RSpec on Windows
    Dir.glob("/tmp/metasploit_credential_importer_zip_file*") do |path|
      FileUtils.rm_rf(path)
    end
  end

  #
  # Callbacks
  #

  # Clean up leftovers from aborted spec runs.
  before(:example) do
    remove_metasploit_credential_importer_zip_files
  end

  # Clean up after completed spec runs.
  after(:example) do
    remove_metasploit_credential_importer_zip_files
  end
end

Version data entries

49 entries across 49 versions & 1 rubygems

Version Path
metasploit-credential-6.0.11 spec/support/shared/contexts/metasploit/credential/importer/zip/file.rb
metasploit-credential-6.0.10 spec/support/shared/contexts/metasploit/credential/importer/zip/file.rb
metasploit-credential-6.0.9 spec/support/shared/contexts/metasploit/credential/importer/zip/file.rb
metasploit-credential-6.0.8 spec/support/shared/contexts/metasploit/credential/importer/zip/file.rb
metasploit-credential-6.0.7 spec/support/shared/contexts/metasploit/credential/importer/zip/file.rb
metasploit-credential-6.0.6 spec/support/shared/contexts/metasploit/credential/importer/zip/file.rb
metasploit-credential-6.0.5 spec/support/shared/contexts/metasploit/credential/importer/zip/file.rb
metasploit-credential-6.0.4 spec/support/shared/contexts/metasploit/credential/importer/zip/file.rb
metasploit-credential-6.0.3 spec/support/shared/contexts/metasploit/credential/importer/zip/file.rb
metasploit-credential-6.0.2 spec/support/shared/contexts/metasploit/credential/importer/zip/file.rb
metasploit-credential-6.0.1 spec/support/shared/contexts/metasploit/credential/importer/zip/file.rb
metasploit-credential-6.0.0 spec/support/shared/contexts/metasploit/credential/importer/zip/file.rb
metasploit-credential-5.0.9 spec/support/shared/contexts/metasploit/credential/importer/zip/file.rb
metasploit-credential-5.0.8 spec/support/shared/contexts/metasploit/credential/importer/zip/file.rb
metasploit-credential-5.0.7 spec/support/shared/contexts/metasploit/credential/importer/zip/file.rb
metasploit-credential-5.0.6 spec/support/shared/contexts/metasploit/credential/importer/zip/file.rb
metasploit-credential-5.0.5 spec/support/shared/contexts/metasploit/credential/importer/zip/file.rb
metasploit-credential-5.0.4 spec/support/shared/contexts/metasploit/credential/importer/zip/file.rb
metasploit-credential-5.0.3 spec/support/shared/contexts/metasploit/credential/importer/zip/file.rb
metasploit-credential-5.0.2 spec/support/shared/contexts/metasploit/credential/importer/zip/file.rb