File tree Expand file tree Collapse file tree 1 file changed +11
-13
lines changed
gem-maven-plugin/src/it/execute-compass-with-gems-from-plugin Expand file tree Collapse file tree 1 file changed +11
-13
lines changed Original file line number Diff line number Diff line change 1
1
import java.io.*;
2
+ import java.util.*;
2
3
import org.codehaus.plexus.util.FileUtils;
3
4
4
5
5
6
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 )
18
12
{
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
+ }
20
18
}
You can’t perform that action at this time.
0 commit comments