Skip to content
This repository has been archived by the owner on Sep 18, 2021. It is now read-only.

Commit

Permalink
addressed pull request feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeremy Cloud committed Mar 28, 2012
1 parent 0d17f70 commit 6d4c8fa
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion project/plugins/Plugins.scala
@@ -1,7 +1,7 @@
import sbt._
import scala.collection.jcl

class Plugins(info: ProjectInfo) extends PluginDefinition(info) {
import scala.collection.jcl
val environment = jcl.Map(System.getenv())
def isSBTOpenTwitter = environment.get("SBT_OPEN_TWITTER").isDefined
def isSBTTwitter = environment.get("SBT_TWITTER").isDefined
Expand Down
Expand Up @@ -13,6 +13,8 @@ import config.Connection
trait ConfiguredSpecification extends Specification {
lazy val config = try {
val eval = new Eval
// if this repo is embedded in other repo (eg. birdcage), test.scala will be
// one level deeper than if running in a detached repo mode.
val configFile =
Some(new File("querulous/config/test.scala")) filter { _.exists } orElse {
Some(new File("config/test.scala")) filter { _.exists }
Expand All @@ -26,6 +28,10 @@ trait ConfiguredSpecification extends Specification {
throw e
}

/**
* Wrap a test in this method to prevent it from running when on the CI machine.
* Some tests require a local mysqld, and will fail if executed on the CI machine.
*/
def skipIfCI(f: => Unit) {
if (System.getenv().containsKey("SBT_CI")) {
skip("skipping on CI machine")
Expand Down

0 comments on commit 6d4c8fa

Please sign in to comment.