autotest POC

Skip to first unread message

Steven Parkes

unread,
Oct 29, 2009, 7:33:27 PM10/29/09
to johnso...@googlegroups.com
I've thrown together a proof of concept for using envjsrb (env.js on
Johnson) to run Jasmine (Javascript BDD framework) specs under autotest.

Screen shot at http://www.scrnshots.com/users/smparkes/screenshots/205913
.

If you're interested in trying it, you need the latest smparkes.envjs
gem (has to be installed as a gem, the way autotest works ... at least
so far). You need my lightly tweaked version of Jasmine: git://github.com/smparkes/jasmine.git
. (I've only started playing with Jasmine. The screen shot is actually
a run of the Jasmine specs.)

You need to put "require 'autotest/envjs'" in your ~/.autotest. You
probably want to put something like "begin .... ; rescue Exception =>
e; end" around it so it doesn't kill autotest when you don't have it
installed. Hmm ... guess we could have a different command instead.
autojas?

In theory, that's about it. Just run autotest.

It will run JS tests if it looks like a Jasmine directory. If you have
both rspec and Jasmine specs (and or test unit/qunit tests) in the
same hierarchy, I think you're kinda hosed. I don't think autotest can
handle that. I'm thinking of looking more into something like watchr.
I tend to write in multiple languages, so in this case, might need
something a bit less opinionated, where it runs all my tests in all my
languages at the same time.

Uses my Tracemonky port of Johnson. It's been stable through quite a
bit of testing (working on the env.js port and the Jasmine integration).

Steven Parkes

unread,
Oct 30, 2009, 3:25:21 PM10/30/09
to johnso...@googlegroups.com

On Oct 29, 2009, at Oct 29,4:33 PM , Steven Parkes wrote:

> If you're interested in trying it, you need ...

Packaged as the smparkes.jazrb gem now, which comes with my version of
Jasmine and the install will (should) pull in all the other
dependencies.

Then, from the root of a project, like the jasmine root directory
(i.e., the parent of the spec directory), jazrb <specfile[s]>, e.g.,
jazrb spec/suites/EnvSpec.js, or simply "autojaz" to have it run all
the specs repeatedly.

Reply all
Reply to author
Forward
0 new messages