From a9194eb4c1e7a5fd3dc2ba588794f847b4cee555 Mon Sep 17 00:00:00 2001 From: Abel Salgado Romero Date: Fri, 17 Jul 2020 00:53:45 +0200 Subject: [PATCH] fix IT test execute-compass-with-gems-from-plugin --- .../verify.bsh | 24 +++++++++---------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/gem-maven-plugin/src/it/execute-compass-with-gems-from-plugin/verify.bsh b/gem-maven-plugin/src/it/execute-compass-with-gems-from-plugin/verify.bsh index fe7eeb98..6469bd18 100644 --- a/gem-maven-plugin/src/it/execute-compass-with-gems-from-plugin/verify.bsh +++ b/gem-maven-plugin/src/it/execute-compass-with-gems-from-plugin/verify.bsh @@ -1,20 +1,18 @@ import java.io.*; +import java.util.*; import org.codehaus.plexus.util.FileUtils; String log = FileUtils.fileRead( new File( basedir, "build.log" ) ); -String expected = "Successfully installed compass-"; -if ( !log.contains( expected ) ) -{ - throw new RuntimeException( "log file does not contain '" + expected + "'" ); -} -expected = "Successfully installed sass-"; -if ( !log.contains( expected ) ) -{ - throw new RuntimeException( "log file does not contain '" + expected + "'" ); -} -expected = "Individual stylesheets must be in the sass directory."; -if ( !log.contains( expected ) ) + +String installMessage = "Successfully installed "; +String[] expectedGems = new String[] { "compass-", "sass-", "rb-inotify-" }; + +for ( String expectedGem: expectedGems ) { - throw new RuntimeException( "log file does not contain '" + expected + "'" ); + String expected = installMessage + expectedGem; + if ( !log.contains( expected ) ) + { + throw new RuntimeException( "log file does not contain '" + expected + "'" ); + } }