Sha256: 57bad1274ac45d20c45a3a6a78d4615cddb1bf27bdcddbe1fa6181425f365157

Contents?: true

Size: 538 Bytes

Versions: 4

Compression:

Stored size: 538 Bytes

Contents

require "phantomjs"
require "teabag/runner"

module Teabag
  module Drivers
    class PhantomjsDriver < BaseDriver

      def run_specs(suite, url)
        runner = Teabag::Runner.new(suite)

        Phantomjs.instance_variable_set(:@executable, Teabag.configuration.phantomjs_bin)
        Phantomjs.run(script, url) do |line|
          runner.process(line)
        end

        runner.failure_count
      end

      protected

      def script
        File.expand_path("../phantomjs/runner.coffee", __FILE__)
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
teabag-0.5.4 lib/teabag/drivers/phantomjs_driver.rb
teabag-0.5.3 lib/teabag/drivers/phantomjs_driver.rb
teabag-0.5.2 lib/teabag/drivers/phantomjs_driver.rb
teabag-0.5.1 lib/teabag/drivers/phantomjs_driver.rb