Harmony, from Martin Aumont, is a new Ruby DSL for executing JavaScript and DOM-using code from within Ruby apps. Why’s that cool? Well, it enables you to build your own Ruby-level unit tests for JavaScript code within your Web applications – everything can be under one set of test suites!
Harmony sounds like a significant piece of engineering, but really it’s a wrapper that stands on the shoulder of giants in the form of Johnson, which provides the Mozilla Spidermonkey Javascript runtime to Ruby, and env.js, a DOM environment recreated in JavaScript.
Harmony’s “Hello World” example:
HolyGrail: The Rails Plugin
If you’re using Rails, HolyGrail is a plugin that brings the power of Harmony to your apps (so far in functional tests only). Read More