jasmine/spec/jasmine_spec.rb

23 lines
710 B
Ruby
Raw Normal View History

require 'rubygems'
require "selenium_rc"
2009-09-05 06:04:48 +00:00
require File.expand_path(File.join(File.dirname(__FILE__), "jasmine_helper.rb"))
require File.expand_path(File.join(JasmineHelper.jasmine_root, "contrib/ruby/jasmine_spec_builder"))
2009-09-05 06:04:48 +00:00
jasmine_runner = Jasmine::Runner.new(SeleniumRC::Server.new.jar_path,
JasmineHelper.spec_file_urls,
2009-09-05 06:04:48 +00:00
JasmineHelper.dir_mappings)
2009-09-05 06:04:48 +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