Fix toString

This commit is contained in:
Eugene Yokota 2017-06-30 04:25:48 -04:00
parent 7e87603b5f
commit 31d519a003
2 changed files with 5 additions and 9 deletions

View File

@ -71,7 +71,6 @@ final class UpdateOptions private[sbt] (
s"""UpdateOptions(
| circularDependencyLevel = $circularDependencyLevel,
| latestSnapshots = $latestSnapshots,
| consolidatedResolution = $consolidatedResolution,
| cachedResolution = $cachedResolution
|)""".stripMargin

View File

@ -5,22 +5,19 @@ import sbt.internal.util.UnitSpec
class UpdateOptionsSpec extends UnitSpec {
"UpdateOptions" should "have proper toString defined" in {
UpdateOptions().toString() should be(
"""|UpdateOptions(
UpdateOptions().toString() should be("""|UpdateOptions(
| circularDependencyLevel = warn,
| latestSnapshots = false,
| consolidatedResolution = false,
| latestSnapshots = true,
| cachedResolution = false
|)""".stripMargin)
UpdateOptions()
.withCircularDependencyLevel(CircularDependencyLevel.Error)
.withCachedResolution(true)
.withLatestSnapshots(true).toString() should be(
"""|UpdateOptions(
.withLatestSnapshots(false)
.toString() should be("""|UpdateOptions(
| circularDependencyLevel = error,
| latestSnapshots = true,
| consolidatedResolution = false,
| latestSnapshots = false,
| cachedResolution = true
|)""".stripMargin)
}