dependency-check-core/src/test/java/org/owasp/dependencycheck/analyzer/RubyBundleAuditAnalyzerTest.java
/**
     * Test when Ruby bundle-audit is not available on the system.
     *
     * @throws AnalysisException is thrown when an exception occurs.
     */
Test when Ruby bundle-audit is not available on the system.
@throws AnalysisException is thrown when an exception occurs.
Test when Ruby bundle - audit is not available on the system . @throws AnalysisException is thrown when an exception occurs .
@Test
    public void testMissingBundleAudit() throws AnalysisException, DatabaseException {
        Settings.setString(Settings.KEYS.ANALYZER_BUNDLE_AUDIT_PATH, "phantom-bundle-audit");
        try {
            analyzer.initialize();
        } catch (Exception e) {
            assertNotNull(e);
        } finally {
            assertThat(analyzer.isEnabled(), is(false));
            LOGGER.info("phantom-bundle-audit is not available. Ruby Bundle Audit Analyzer is disabled as expected.");
        }
    }
@ Test public void testMissingBundleAudit ( ) throws AnalysisException , DatabaseException { Settings . setString ( Settings . KEYS . ANALYZER_BUNDLE_AUDIT_PATH , "phantom-bundle-audit" ) ; try { analyzer . initialize ( ) ; } catch ( Exception e ) { assertNotNull ( e ) ; } finally { assertThat ( analyzer . isEnabled ( ) , is ( false ) ) ; LOGGER . info ( "phantom-bundle-audit is not available. Ruby Bundle Audit Analyzer is disabled as expected." ) ; } }
Test when Ruby bundle-audit is not available on the system.
Test when Ruby bundle - audit is not available on the system .
//set a non-exist bundle-audit //initialize should fail. //expected, so ignore.