Skip to content

Commit

Permalink
Fix tests?
Browse files Browse the repository at this point in the history
  • Loading branch information
iamdanfox committed Jul 31, 2019
1 parent c794fd5 commit 5f1c117
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class BaselineConfigIntegrationTest extends AbstractPluginTest {
""".stripIndent()

then:
with('--stacktrace', '--info', 'baselineUpdateConfig').build()
with('--stacktrace', '--info', 'baselineUpdateConfig', '-Pcom.palantir.baseline-format.eclipse').build()
directory('.baseline').list().toList().toSet() == [
'checkstyle', 'copyright', 'eclipse', 'idea', 'spotless'
].toSet()
Expand All @@ -68,7 +68,7 @@ class BaselineConfigIntegrationTest extends AbstractPluginTest {
then:
with('--stacktrace', '--info', 'baselineUpdateConfig').build()
directory('.baseline').list().toList().toSet() == [
'checkstyle', 'copyright', 'eclipse', 'idea', 'spotless'
'checkstyle', 'copyright', 'eclipse', 'idea'
].toSet()
directory('project').list().toList().toSet() == ['scalastyle_config.xml'].toSet()
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,7 @@ class BaselineFormatIntegrationTest extends AbstractPluginTest {
def invalidJavaFile = '''
package test;
import com.java.unused;
public class Test { void test() {
int x = 1;
public class Test { void test() {int x = 1;
System.out.println(
"Hello"
);
Expand Down Expand Up @@ -94,7 +91,7 @@ class BaselineFormatIntegrationTest extends AbstractPluginTest {
file('src/main/java/test/Test.java') << invalidJavaFile

then:
BuildResult result = with('format').build();
BuildResult result = with('format', '-Pcom.palantir.baseline-format.eclipse').build();
result.task(":format").outcome == TaskOutcome.SUCCESS
result.task(":spotlessApply").outcome == TaskOutcome.SUCCESS
file('src/main/java/test/Test.java').text == validJavaFile
Expand All @@ -109,7 +106,7 @@ class BaselineFormatIntegrationTest extends AbstractPluginTest {
file('src/foo/java/test/Test.java') << invalidJavaFile

then:
BuildResult result = with('format').build()
BuildResult result = with('format', '-Pcom.palantir.baseline-format.eclipse').build()
result.task(":format").outcome == TaskOutcome.SUCCESS
result.task(":spotlessApply").outcome == TaskOutcome.SUCCESS
file('src/foo/java/test/Test.java').text == validJavaFile
Expand All @@ -125,7 +122,7 @@ class BaselineFormatIntegrationTest extends AbstractPluginTest {
file('src/foo/groovy/test/Test.java') << invalidJavaFile

then:
BuildResult result = with('format').build()
BuildResult result = with('format', '-Pcom.palantir.baseline-format.eclipse').build()
result.task(":format").outcome == TaskOutcome.SUCCESS
result.task(":spotlessApply").outcome == TaskOutcome.SUCCESS
file('src/foo/groovy/test/Test.java').text == validJavaFile
Expand Down

0 comments on commit 5f1c117

Please sign in to comment.