#!/usr/bin/env ruby # LICENSE: This code is public domain. Do whatever you want with it. # A script to generate a JsUnit suite. For more info, see: # http://www.eahanson.com/weblog/?p=16 require "erb" test_pages = Dir[File.join("test/**", "*Test.html")].sort test_runner_path = File.expand_path("test/jsunit/testRunner.html"); template = %{ JsUnit Test Suite

JsUnit Test Suite

run suite

<% test_pages.each do |test_page| %> <% end %>
<%= test_page %> run view
}.gsub(/^ /, '') File.open("test/suite.html", "w+") do |f| f << ERB.new(template).result end