Sha256: 4cdcc1ca2ad5343300cd77339e0f4f41a7b9c7b4c26b656c0732080212ebc966

Contents?: true

Size: 381 Bytes

Versions: 13

Compression:

Stored size: 381 Bytes

Contents

module EnvironmentOverride
  module_function
  def with_anti_virus_scanner(success = true)
    before_override = Curate.configuration.default_antivirus_instance
    instance = success ? lambda {|f| 0 } : lambda {|f| 1 }
    Curate.configuration.default_antivirus_instance = instance
    yield
  ensure
    Curate.configuration.default_antivirus_instance = before_override
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
curate-0.6.6 spec/support/environment_override.rb
curate-0.6.5 spec/support/environment_override.rb
curate-0.6.4 spec/support/environment_override.rb
curate-0.6.3 spec/support/environment_override.rb
curate-0.6.1 spec/support/environment_override.rb
curate-0.6.0 spec/support/environment_override.rb
curate-0.5.6 spec/support/environment_override.rb
curate-0.5.5 spec/support/environment_override.rb
curate-0.5.4 spec/support/environment_override.rb
curate-0.5.2 spec/support/environment_override.rb
curate-0.5.1 spec/support/environment_override.rb
curate-0.5.0 spec/support/environment_override.rb
curate-0.4.2 spec/support/environment_override.rb