Sha256: c2350abb65392d2973d87f9e4708105cc4e06348947907ef7c70c9479cf47cff

Contents?: true

Size: 850 Bytes

Versions: 2

Compression:

Stored size: 850 Bytes

Contents

begin
  require 'symbiont'
  require 'symbiont/factory'
rescue LoadError
  STDOUT.puts ["The Symbiont test execution library is not installed.",
               "The driver file is currently set to use the Symbiont library but",
               "that gem was not found. Run the following command:", "",
               "  gem install symbiont"].join("\n")
  Kernel.exit(1)
end

Domain(Symbiont::Factory)

module Symbiont
  module Browser

    @@browser = false

    def self.start
      unless @@browser
        target = ENV['BROWSER'] || 'firefox'
        @@browser = watir_browser(target)
      end
      @@browser
    end

    def self.stop
      @@browser.quit if @@browser
      @@browser = false
    end

  private

    def self.watir_browser(target)
      Watir::Browser.new(target.to_sym)
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
lucid-0.2.0 lib/lucid/generators/project/browser-symbiont.rb
lucid-0.1.1 lib/lucid/generators/project/browser-symbiont.rb