From 385df1cc1ac6f78936bd7c4b589cb7b3ceff1fa3 Mon Sep 17 00:00:00 2001 From: Mattias Reichel Date: Thu, 12 Dec 2024 18:39:56 +0100 Subject: [PATCH] fix: remove space before `testFixtures` parentheses (#461) The `testFixtures` method call should not have a space before the parentheses to adhere to proper syntax. --- .../java/org/grails/forge/build/gradle/GradleDependency.java | 3 ++- .../grails/forge/feature/test/GebWithTestcontainersSpec.groovy | 2 +- .../forge/feature/test/GebWithWebDriverBinariesSpec.groovy | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/grails-forge-core/src/main/java/org/grails/forge/build/gradle/GradleDependency.java b/grails-forge-core/src/main/java/org/grails/forge/build/gradle/GradleDependency.java index 864c9db1..5ea68eca 100644 --- a/grails-forge-core/src/main/java/org/grails/forge/build/gradle/GradleDependency.java +++ b/grails-forge-core/src/main/java/org/grails/forge/build/gradle/GradleDependency.java @@ -101,7 +101,8 @@ public int hashCode() { @NonNull public String toSnippet() { - String snippet = gradleConfiguration.getConfigurationName() + " "; + String optionalSpace = gradleConfiguration == INTEGRATION_TEST_IMPLEMENTATION_TEST_FIXTURES ? "" : " "; + String snippet = gradleConfiguration.getConfigurationName() + optionalSpace; if (isPom()) { snippet += "platform("; } else if (gradleConfiguration == INTEGRATION_TEST_IMPLEMENTATION_TEST_FIXTURES) { diff --git a/grails-forge-core/src/test/groovy/org/grails/forge/feature/test/GebWithTestcontainersSpec.groovy b/grails-forge-core/src/test/groovy/org/grails/forge/feature/test/GebWithTestcontainersSpec.groovy index 491ff9b6..dc034d01 100644 --- a/grails-forge-core/src/test/groovy/org/grails/forge/feature/test/GebWithTestcontainersSpec.groovy +++ b/grails-forge-core/src/test/groovy/org/grails/forge/feature/test/GebWithTestcontainersSpec.groovy @@ -15,7 +15,7 @@ class GebWithTestcontainersSpec extends ApplicationContextSpec implements Comman def buildGradle = output['build.gradle'] expect: - buildGradle.contains('integrationTestImplementation testFixtures ("org.grails.plugins:geb")') + buildGradle.contains('integrationTestImplementation testFixtures("org.grails.plugins:geb")') } @Unroll diff --git a/grails-forge-core/src/test/groovy/org/grails/forge/feature/test/GebWithWebDriverBinariesSpec.groovy b/grails-forge-core/src/test/groovy/org/grails/forge/feature/test/GebWithWebDriverBinariesSpec.groovy index d675670a..cb6f1b4b 100644 --- a/grails-forge-core/src/test/groovy/org/grails/forge/feature/test/GebWithWebDriverBinariesSpec.groovy +++ b/grails-forge-core/src/test/groovy/org/grails/forge/feature/test/GebWithWebDriverBinariesSpec.groovy @@ -16,7 +16,7 @@ class GebWithWebDriverBinariesSpec extends ApplicationContextSpec implements Com def buildGradle = output['build.gradle'] expect: - buildGradle.contains('integrationTestImplementation testFixtures ("org.grails.plugins:geb")') + buildGradle.contains('integrationTestImplementation testFixtures("org.grails.plugins:geb")') buildGradle.contains('testImplementation "org.seleniumhq.selenium:selenium-api"') buildGradle.contains('testImplementation "org.seleniumhq.selenium:selenium-support"') buildGradle.contains('testImplementation "org.seleniumhq.selenium:selenium-remote-driver"')