slagyr / speclj

pronounced "speckle": a TDD/BDD framework for Clojure.
MIT License
458 stars 58 forks source link

Unable to open file '/dev/stdout' #144

Open mauricioszabo opened 8 years ago

mauricioszabo commented 8 years ago

Just a simple correction, on some linux versions (mine is Ubuntu 14.04), this error happens when trying to use speclj on ClojureScript with the generated code you provide, or with the bin/speclj that you document. I've corrected using the following bin/speclj:

#! /usr/bin/env phantomjs

var fs = require("fs");
var p = require('webpage').create();
var sys = require('system');

p.onConsoleMessage = function (x) {
    sys.stdout.write(x); // <- use the internal API
};

p.injectJs("resources/private/js/polyfill.js");
p.injectJs(phantom.args[0]);

var result = p.evaluate(function () {
  speclj.run.standard.armed = true;
  return speclj.run.standard.run_specs(
     cljs.core.keyword("color"), true
  );
});

phantom.exit(result);

So that others with the same problem as me could have somewhere to search :)

aklt commented 8 years ago

Thanks for that, I ran into the same issue :-)