Sha256: 7235733fdb76a167c01ae1ab20e31d2dbebc35671666ddbb36b51b15653df5a5

Contents?: true

Size: 808 Bytes

Versions: 3

Compression:

Stored size: 808 Bytes

Contents

require 'jasmine'
require 'rspec/core/rake_task'
require 'testingbot'

namespace :jasmine do
  def run_jasmine_server
    ENV['JASMINE_PORT'] = '3001'
    Jasmine::Config.new.start_jasmine_server
  end

  desc "Execute Jasmine tests in a Chrome browser on testingbot"
  task :testingbot do
    run_jasmine_server
    Rake::Task['jasmine:testingbot:chrome'].execute
  end

  namespace :testingbot do
    desc "Execute Jasmine tests in Chrome and Firefox on TestingBot"
    task :all do
      run_jasmine_server
      threads = []
      [:chrome, :firefox].each do |browser|
        t = Thread.new do
          Rake::Task["jasmine:testingbot:#{browser}"].invoke
        end
        t.abort_on_exception = true
        threads << t
      end

      threads.each do |t|
        t.join
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
testingbot-0.1.7 lib/testingbot/jasmine/Rakefile
testingbot-0.1.6 lib/testingbot/jasmine/Rakefile
testingbot-0.1.5 lib/testingbot/jasmine/Rakefile