jasmine/spec/jasmine_self_test_runner.rb

27 lines
549 B
Ruby
Raw Normal View History

2009-12-28 18:08:23 +00:00
require 'jasmine'
class JasmineSelfTestRunner < Jasmine::Runner
def proj_root
File.expand_path(File.join(File.dirname(__FILE__), ".."))
end
def src_dir
File.join(proj_root, 'src')
end
def src_files
Dir.glob(File.join(src_dir, "**/*.js"))
end
def spec_dir
File.join(proj_root, 'jasmine/spec')
end
def spec_files
Dir.glob(File.join(spec_dir, "**/*[Ss]pec.js")).collect { |f| f.sub("#{spec_dir}/", "") }
end
#
# def specs
# Jasmine.cachebust(spec_files).collect {|f| f.sub(spec_dir, "/spec")}
# end
end