Skip to content

Commit

Permalink
Upgrades specs2 version
Browse files Browse the repository at this point in the history
Signed-off-by: Albert Pastrana <albert.pastrana@gmail.com>
  • Loading branch information
albertpastrana committed Apr 16, 2018
1 parent 7aa7f8f commit 720363b
Show file tree
Hide file tree
Showing 10 changed files with 30 additions and 20 deletions.
2 changes: 1 addition & 1 deletion i18n/build.sbt
Expand Up @@ -12,5 +12,5 @@ scmInfo := Some(ScmInfo(browseUrl = new URL("https://github.com/albertpastrana/u
connection = "scm:git:git@github.com:albertpastrana/uscala.git"))

libraryDependencies ++= Seq(
"org.specs2" %% "specs2-core" % "3.8.6" % "test"
Dependencies.Specs2Core
)
13 changes: 13 additions & 0 deletions project/Dependencies.scala
@@ -0,0 +1,13 @@
import sbt._

object Dependencies {

object Versions {
val Specs2 = "4.0.3"
}

// Libraries
val Specs2Core = "org.specs2" %% "specs2-core" % Versions.Specs2
val Specs2ScalaCheck = "org.specs2" %% "specs2-scalacheck" % Versions.Specs2

}
2 changes: 1 addition & 1 deletion resources/build.sbt
Expand Up @@ -13,5 +13,5 @@ scmInfo := Some(ScmInfo(browseUrl = new URL("https://github.com/albertpastrana/u
connection = "scm:git:git@github.com:albertpastrana/uscala.git"))

libraryDependencies ++= Seq(
"org.specs2" %% "specs2-core" % "3.8.6" % "test"
Dependencies.Specs2Core
)
6 changes: 3 additions & 3 deletions result-async/build.sbt
Expand Up @@ -14,6 +14,6 @@ scmInfo := Some(ScmInfo(browseUrl = new URL("https://github.com/albertpastrana/u
connection = "scm:git:git@github.com:albertpastrana/uscala.git"))

libraryDependencies ++= Seq(
"org.specs2" %% "specs2-core" % "3.8.6" % "test",
"org.specs2" %% "specs2-scalacheck" % "3.8.6" % "test"
)
Dependencies.Specs2Core,
Dependencies.Specs2ScalaCheck
)
Expand Up @@ -6,7 +6,6 @@ import org.scalacheck.{Arbitrary, Gen}
import org.specs2.ScalaCheck
import org.specs2.concurrent.ExecutionEnv
import org.specs2.mutable.Specification
import org.specs2.specification.mutable.ExecutionEnvironment
import uscala.concurrent.result.AsyncResult.{attemptFuture, attemptSync, fromFuture, fromResult, fail => asyncFail, ok => asyncOk}
import uscala.result.Result
import uscala.result.Result.{Fail, Ok}
Expand All @@ -15,8 +14,7 @@ import uscala.result.specs2.ResultMatchers
import scala.concurrent.Future
import scala.concurrent.duration._

class AsyncResultSpec extends Specification with ScalaCheck with ResultMatchers
with ExecutionEnvironment { def is(implicit ee: ExecutionEnv): Unit = {
class AsyncResultSpec(implicit ee: ExecutionEnv) extends Specification with ScalaCheck with ResultMatchers {

def resultGen: Gen[Result[Int, Int]] = Gen.posNum[Int].flatMap(i => Gen.oneOf(Ok[Int](i), Fail[Int](i)))

Expand Down Expand Up @@ -299,4 +297,4 @@ class AsyncResultSpec extends Specification with ScalaCheck with ResultMatchers
}
}
}
}}
}
@@ -1,10 +1,9 @@
package uscala.result.specs2

import org.specs2.Spec
import org.specs2.matcher.{ResultMatchers => SResultMatchers}
import uscala.result.Result._

class ResultMatchersSpec extends Spec with SResultMatchers with ResultMatchers { def is = s2"""
class ResultMatchersSpec extends Spec with ResultMatchers { def is = s2"""
The ResultMatchers trait provides matchers to check Result instances

beOk checks if an element is Ok(_)
Expand All @@ -14,7 +13,7 @@ class ResultMatchersSpec extends Spec with SResultMatchers with ResultMatchers {
${ Ok(1) must beOk(===(1)) }
${ Ok(Seq(1)) must beOk(===(Seq(1))) }
${ Ok(1) must beOk.like { case i => i must be_>(0) } }
${ (Ok(1) must beOk.like { case i => i must be_<(0) }) returns "'Ok(1)' is Ok but 1 is not less than 0" }
${ (Ok(1) must beOk.like { case i => i must be_<(0) }) returns "1 is not less than 0" }
beFail checks if an element is Fail(_)
${ Fail(1) must beFail(1) }
${ Fail(1) must beFail(===(1)) }
Expand Down
6 changes: 3 additions & 3 deletions result/build.sbt
Expand Up @@ -13,6 +13,6 @@ scmInfo := Some(ScmInfo(browseUrl = new URL("https://github.com/albertpastrana/u
connection = "scm:git:git@github.com:albertpastrana/uscala.git"))

libraryDependencies ++= Seq(
"org.specs2" %% "specs2-core" % "3.8.6" % "test",
"org.specs2" %% "specs2-scalacheck" % "3.8.6" % "test"
)
Dependencies.Specs2Core,
Dependencies.Specs2ScalaCheck
)
4 changes: 2 additions & 2 deletions retry/build.sbt
Expand Up @@ -13,6 +13,6 @@ scmInfo := Some(ScmInfo(browseUrl = new URL("https://github.com/albertpastrana/u
connection = "scm:git:git@github.com:albertpastrana/uscala.git"))

libraryDependencies ++= Seq(
"org.specs2" %% "specs2-core" % "3.8.6" % "test",
"org.specs2" %% "specs2-scalacheck" % "3.8.6" % "test"
Dependencies.Specs2Core,
Dependencies.Specs2ScalaCheck
)
2 changes: 1 addition & 1 deletion timeout/build.sbt
Expand Up @@ -13,5 +13,5 @@ scmInfo := Some(ScmInfo(browseUrl = new URL("https://github.com/albertpastrana/u
connection = "scm:git:git@github.com:albertpastrana/uscala.git"))

libraryDependencies ++= Seq(
"org.specs2" %% "specs2-core" % "3.8.6" % "test"
Dependencies.Specs2Core
)
4 changes: 2 additions & 2 deletions url/build.sbt
Expand Up @@ -13,6 +13,6 @@ scmInfo := Some(ScmInfo(browseUrl = new URL("https://github.com/albertpastrana/u
connection = "scm:git:git@github.com:albertpastrana/uscala.git"))

libraryDependencies ++= Seq(
"org.specs2" %% "specs2-core" % "3.8.6" % "test",
"org.specs2" %% "specs2-scalacheck" % "3.8.6" % "test"
Dependencies.Specs2Core,
Dependencies.Specs2ScalaCheck
)

0 comments on commit 720363b

Please sign in to comment.