Jasmine now bundled with The Ruby Racer

39 views
Skip to first unread message

Charles Lowell

unread,
Jun 3, 2010, 7:59:26 AM6/3/10
to Jasmine
Just so you know, I've bundled jasmine with therubyracer as an
optional require, but if you so desire, controlling a completely
headless jasmine environment from ruby is as easy as saying require
'v8/jasmine'

The prerelease is already on rubygems.org and can be installed with

gem install therubyracer --pre

Here is the example I posted yesterday to run a textmate buffer as a
jasmine test suite. Note that the reporter and environment control are
now implemented entirely in ruby.

http://gist.github.com/423788

cheers,
Charles

Davis Frank

unread,
Jun 3, 2010, 10:02:48 AM6/3/10
to jasmi...@googlegroups.com
Hotness.  Thanks for the work & the post! I'll get this in the Pivotal Blabs post today.

--dwf


--
You received this message because you are subscribed to the Google Groups "Jasmine" group.
To post to this group, send email to jasmi...@googlegroups.com.
To unsubscribe from this group, send email to jasmine-js+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/jasmine-js?hl=en.


Charles Lowell

unread,
Jun 3, 2010, 10:18:01 AM6/3/10
to jasmi...@googlegroups.com
Cool. Let me know if you have any questions. I'm planning on putting up a wiki page on exactly how to use it, but now I'm actually busy using it :)

cheers,
Charles

Mike Grafton

unread,
Jun 3, 2010, 12:38:55 PM6/3/10
to jasmi...@googlegroups.com
Very cool. This is similar to what I did with jazz money, except I used Johnson as the JS interpreter (as well as using Envjs to support browser tests). I also used the Rspec runner to control the output (á la jasmine-ruby).

It might be good to roll this all together as a single gem for headless jasmine testing. Unfortunately, last I knew there was still no V8 support for Env.js. Charles, did you make any headway after you asked about it on the env.js list? 

Mike

Charles Lowell

unread,
Jun 3, 2010, 1:31:47 PM6/3/10
to jasmi...@googlegroups.com
Hey Mike,

I did manage to get it to load env.js after making some tweaks to the default, and was able to get a reference to the document, create nodes, and do basic stuff.... but I did not mess with things like iframes and ajax requests.

It was almost trivial to get running:


here is my patched env.js


It's a bit old and I understand they've made a lot nicer for other platforms, but all I had to do was change one place where they were using String.toUpperCase() (Rhino only)

cheers,
Charles
Reply all
Reply to author
Forward
0 new messages