Permalink
Browse files

don't run the json_stats_fetcher test unless the script itself is run…

…nable
  • Loading branch information...
1 parent 96f06fe commit 7458fea84181e79484e5d3033bd6895e4624de6e Robey Pointer committed Aug 13, 2011
Showing with 3 additions and 2 deletions.
  1. +3 −2 src/test/scala/com/twitter/ostrich/stats/JsonStatsFetcherSpec.scala
@@ -6,10 +6,12 @@ import org.specs.Specification
import org.specs.util.TimeConversions._
object JsonStatsFetcherSpec extends Specification {
+ val script = "./src/scripts/json_stats_fetcher.rb"
+
def exec(args: String*) = Runtime.getRuntime.exec(args.toArray)
val hasRuby = try {
- exec("ruby", "--version")
+ exec(script, "--help")
true
} catch {
case e: Throwable => false
@@ -18,7 +20,6 @@ object JsonStatsFetcherSpec extends Specification {
if (hasRuby) {
"json_stats_fetcher.rb" should {
var service: AdminHttpService = null
- val script = "./src/scripts/json_stats_fetcher.rb"
doBefore {
Stats.clearAll()

0 comments on commit 7458fea

Please sign in to comment.