2009-10-11 00:44:59 +00:00
|
|
|
require 'rubygems'
|
|
|
|
require "selenium_rc"
|
|
|
|
|
|
|
|
JASMINE_SPEC_DIR = File.join(File.dirname(__FILE__), "..", "jasmine", "spec")
|
|
|
|
|
|
|
|
require File.expand_path(File.join(File.dirname(__FILE__), "..", "lib", "jasmine-ruby", "jasmine_helper.rb"))
|
2009-11-25 06:42:15 +00:00
|
|
|
require File.expand_path(File.join(JasmineHelper.root, "contrib/ruby/jasmine_spec_builder"))
|
2009-10-11 00:44:59 +00:00
|
|
|
|
|
|
|
jasmine_runner = Jasmine::Runner.new(SeleniumRC::Server.new.jar_path,
|
|
|
|
JasmineHelper.spec_file_urls,
|
2009-11-01 05:35:35 +00:00
|
|
|
JasmineHelper.dir_mappings,
|
|
|
|
:spec_helpers => JasmineHelper.spec_helpers)
|
2009-10-11 00:44:59 +00:00
|
|
|
|
|
|
|
spec_builder = Jasmine::SpecBuilder.new(JasmineHelper.raw_spec_files, jasmine_runner)
|
|
|
|
|
|
|
|
should_stop = false
|
|
|
|
|
|
|
|
Spec::Runner.configure do |config|
|
|
|
|
config.after(:suite) do
|
|
|
|
spec_builder.stop if should_stop
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
spec_builder.start
|
|
|
|
should_stop = true
|
|
|
|
spec_builder.declare_suites
|