Sha256: 543de61ec5e22d7a5c5006847d72fa0e495bc5de8d9a20a68c3843f3582ce2ee

Contents?: true

Size: 941 Bytes

Versions: 4

Compression:

Stored size: 941 Bytes

Contents

$:.unshift(ENV['JASMINE_GEM_PATH']) if ENV['JASMINE_GEM_PATH'] # for gem testing purposes

require 'rubygems'
require 'jasmine'
if Jasmine::Dependencies.rspec2?
  require 'rspec'
else
  require 'spec'
end
require 'jasmine/runners/phantom'

jasmine_yml = File.join(Dir.pwd, 'spec', 'javascripts', 'support', 'jasmine.yml')
if File.exist?(jasmine_yml)
end

Jasmine.load_configuration_from_yaml

config = Jasmine.config
port = Jasmine.find_unused_port
server = Jasmine::Server.new(port, Jasmine::Application.app(config))
t = Thread.new do
  begin
    server.start
  rescue
  end
  # # ignore bad exits
end
t.abort_on_exception = true
Jasmine::wait_for_listener(port, "jasmine server")
puts "jasmine server started."

results_processor = Jasmine::ResultsProcessor.new(config)
results = Jasmine::Runners::Phantom.new(port, results_processor, config.result_batch_size).run
formatter = Jasmine::RspecFormatter.new
formatter.format_results(results)

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
phantom_jasmine-0.1.0 lib/phantom_jasmine/run_specs.rb
phantom_jasmine-0.0.9 lib/phantom_jasmine/run_specs.rb
phantom_jasmine-0.0.8 lib/phantom_jasmine/run_specs.rb
phantom_jasmine-0.0.7 lib/phantom_jasmine/run_specs.rb