Skip to content

Commit a9194eb

Browse files
committed
fix IT test execute-compass-with-gems-from-plugin
1 parent 2f20e77 commit a9194eb

File tree

1 file changed

+11
-13
lines changed
  • gem-maven-plugin/src/it/execute-compass-with-gems-from-plugin

1 file changed

+11
-13
lines changed
Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,18 @@
11
import java.io.*;
2+
import java.util.*;
23
import org.codehaus.plexus.util.FileUtils;
34

45

56
String log = FileUtils.fileRead( new File( basedir, "build.log" ) );
6-
String expected = "Successfully installed compass-";
7-
if ( !log.contains( expected ) )
8-
{
9-
throw new RuntimeException( "log file does not contain '" + expected + "'" );
10-
}
11-
expected = "Successfully installed sass-";
12-
if ( !log.contains( expected ) )
13-
{
14-
throw new RuntimeException( "log file does not contain '" + expected + "'" );
15-
}
16-
expected = "Individual stylesheets must be in the sass directory.";
17-
if ( !log.contains( expected ) )
7+
8+
String installMessage = "Successfully installed ";
9+
String[] expectedGems = new String[] { "compass-", "sass-", "rb-inotify-" };
10+
11+
for ( String expectedGem: expectedGems )
1812
{
19-
throw new RuntimeException( "log file does not contain '" + expected + "'" );
13+
String expected = installMessage + expectedGem;
14+
if ( !log.contains( expected ) )
15+
{
16+
throw new RuntimeException( "log file does not contain '" + expected + "'" );
17+
}
2018
}

0 commit comments

Comments
 (0)