jasmine/bin/jasmine
2009-10-15 00:44:37 -07:00

18 lines
637 B
Ruby
Executable File

#!/usr/bin/env ruby
require File.expand_path(File.join(File.dirname(__FILE__), "..", "lib", "jasmine-ruby", "jasmine_helper.rb"))
if ARGV[1]
require File.expand_path(File.join(Dir.pwd, ARGV[1]))
end
if ARGV[0] == 'server'
require 'rubygems'
require File.expand_path(File.join(__FILE__, "../../jasmine/contrib/ruby/jasmine_spec_builder"))
puts "your tests are here:"
puts " http://localhost:8888/run.html"
JASMINE_SPEC_DIR = ARGV[1] || File.join(Dir.pwd, "spec")
Jasmine::SimpleServer.start(8888,
lambda { JasmineHelper.specs },
JasmineHelper.dir_mappings)
end