Skip to content

Commit

Permalink
Fix failing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
pniederw committed Oct 7, 2014
1 parent f078d96 commit cc11083
Showing 1 changed file with 8 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
package org.gradle.api.plugins.quality

import org.gradle.api.Project
import org.gradle.api.internal.resources.FileCollectionBackedTextResource
import org.gradle.api.plugins.ReportingBasePlugin
import org.gradle.api.tasks.SourceSet
import org.gradle.util.TestUtil
Expand Down Expand Up @@ -54,7 +53,7 @@ class CheckstylePluginTest extends Specification {
expect:
CheckstyleExtension extension = project.extensions.checkstyle
extension.configFile == project.file("config/checkstyle/checkstyle.xml")
extension.config.inputFiles == project.files("config/checkstyle/checkstyle.xml")
extension.config.inputFiles.files == project.files("config/checkstyle/checkstyle.xml").files
extension.configProperties == [:]
extension.reportsDir == project.file("build/reports/checkstyle")
!extension.ignoreFailures
Expand Down Expand Up @@ -82,7 +81,7 @@ class CheckstylePluginTest extends Specification {
assert checkstyleClasspath == project.configurations["checkstyle"]
assert classpath == sourceSet.output
assert configFile == project.file("config/checkstyle/checkstyle.xml")
assert config.inputFiles == project.files("config/checkstyle/checkstyle.xml")
assert config.inputFiles.files == project.files("config/checkstyle/checkstyle.xml").files
assert configProperties == [:]
assert reports.xml.destination == project.file("build/reports/checkstyle/${sourceSet.name}.xml")
assert !ignoreFailures
Expand All @@ -98,7 +97,7 @@ class CheckstylePluginTest extends Specification {
task.source.isEmpty()
task.checkstyleClasspath == project.configurations.checkstyle
task.configFile == project.file("config/checkstyle/checkstyle.xml")
task.config.inputFiles == project.files("config/checkstyle/checkstyle.xml")
task.config.inputFiles.files == project.files("config/checkstyle/checkstyle.xml").files
task.configProperties == [:]
task.reports.xml.destination == project.file("build/reports/checkstyle/custom.xml")
!task.ignoreFailures
Expand Down Expand Up @@ -127,7 +126,7 @@ class CheckstylePluginTest extends Specification {
project.checkstyle {
sourceSets = [project.sourceSets.main]
configFile = project.file("checkstyle-config")
config.inputFiles = project.files("checkstyle-config")
config = project.resources.text(project.file("checkstyle-config"))
configProperties = [foo: "foo"]
reportsDir = project.file("checkstyle-reports")
ignoreFailures = true
Expand All @@ -150,19 +149,19 @@ class CheckstylePluginTest extends Specification {
assert source as List == sourceSet.allJava as List
assert checkstyleClasspath == project.configurations["checkstyle"]
assert configFile == project.file("checkstyle-config")
assert config.inputFiles == project.files("checkstyle-config")
assert config.inputFiles.files == project.files("checkstyle-config").files
assert configProperties == [foo: "foo"]
assert reports.xml.destination == project.file("checkstyle-reports/${sourceSet.name}.xml")
assert ignoreFailures
assert showViolations
}
}

def "can customize any additional checkstyle tasks via extension"() {
def task = project.tasks.create("checkstyleCustom", Checkstyle)
project.checkstyle {
configFile = project.file("checkstyle-config")
config.inputFiles = project.files("checkstyle-config")
config = project.resources.text(project.file("checkstyle-config"))
configProperties = [foo: "foo"]
reportsDir = project.file("checkstyle-reports")
ignoreFailures = true
Expand All @@ -173,7 +172,7 @@ class CheckstylePluginTest extends Specification {
task.source.isEmpty()
task.checkstyleClasspath == project.configurations.checkstyle
task.configFile == project.file("checkstyle-config")
task.config.inputFiles == project.files("checkstyle-config")
task.config.inputFiles.files == project.files("checkstyle-config").files
task.configProperties == [foo: "foo"]
task.reports.xml.destination == project.file("checkstyle-reports/custom.xml")
task.ignoreFailures
Expand Down

0 comments on commit cc11083

Please sign in to comment.