spec/dummy/config/environments/test.rb in curate-0.2.0 vs spec/dummy/config/environments/test.rb in curate-0.3.1
- old
+ new
@@ -13,11 +13,11 @@
# Log error messages when you accidentally call methods on nil
config.whiny_nils = true
# Show full error reports and disable caching
- config.consider_all_requests_local = true
+ config.consider_all_requests_local = false
config.action_controller.perform_caching = false
# Raise exceptions instead of rendering exception templates
config.action_dispatch.show_exceptions = false
@@ -32,6 +32,22 @@
# Raise exception on mass assignment protection for Active Record models
config.active_record.mass_assignment_sanitizer = :strict
# Print deprecation notices to the stderr
config.active_support.deprecation = :stderr
+
+ if ENV['FULL_STACK']
+ require 'clamav'
+ ClamAV.instance.loaddb
+ config.default_antivirus_instance = lambda {|file_path|
+ ClamAV.instance.scanfile(file_path)
+ }
+ else
+ config.default_antivirus_instance = lambda {|file_path|
+ AntiVirusScanner::NO_VIRUS_FOUND_RETURN_VALUE
+ }
+ config.default_characterization_runner = lambda { |file_path|
+ Rails.root.join('../../spec/support/files/default_fits_output.xml').read
+ }
+ end
+
end