Sha256: c18eb0a9de0523f33607e45ce5e24bee5e82a6c1e58544391045cd1aba9c01b5

Contents?: true

Size: 773 Bytes

Versions: 24

Compression:

Stored size: 773 Bytes

Contents

class Browser
  def initialize(path)
    unless path == :ignore
      @path = path
      puts "WARNING: #{self} does not exist at #{@path}" unless File.exists?(@path)
    end
  end
end

if Browser.new(:ignore).macos?
  class SafariBrowser
    def setup; end # no need to create new Browser, as open command automates this
    def visit(file)
      @path ||= 'Safari.app'
      `open #{file} -a #{@path} -g`
    end
    def teardown; end # no need to destroy Browser
  end

  class FirefoxBrowser
    def setup; end # no need to create new Browser, as open command automates this
    def visit(file)
      @path ||= 'Safari.app'
      puts "open #{file} -a #{@path} -g"
      `open #{file} -a #{@path} -g`
    end
    def teardown; end # no need to destroy Browser
  end
end

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
newjs-1.7.4 lib/newjs/autotest/javascript_test_ext.rb
newjs-1.0.1 lib/newjs/autotest/javascript_test_ext.rb
newjs-1.0.2 lib/newjs/autotest/javascript_test_ext.rb
newjs-1.0.3 lib/newjs/autotest/javascript_test_ext.rb
newjs-1.0.0 lib/newjs/autotest/javascript_test_ext.rb
newjs-1.1.0 lib/newjs/autotest/javascript_test_ext.rb
newjs-1.2.0 lib/newjs/autotest/javascript_test_ext.rb
newjs-1.2.1 lib/newjs/autotest/javascript_test_ext.rb
newjs-1.3.0 lib/newjs/autotest/javascript_test_ext.rb
newjs-1.0.4 lib/newjs/autotest/javascript_test_ext.rb
newjs-1.3.2 lib/newjs/autotest/javascript_test_ext.rb
newjs-1.3.3 lib/newjs/autotest/javascript_test_ext.rb
newjs-1.3.4 lib/newjs/autotest/javascript_test_ext.rb
newjs-1.3.5 lib/newjs/autotest/javascript_test_ext.rb
newjs-1.3.6 lib/newjs/autotest/javascript_test_ext.rb
newjs-1.3.1 lib/newjs/autotest/javascript_test_ext.rb
newjs-1.3.7 lib/newjs/autotest/javascript_test_ext.rb
newjs-1.4.1 lib/newjs/autotest/javascript_test_ext.rb
newjs-1.5.0 lib/newjs/autotest/javascript_test_ext.rb
newjs-1.5.1 lib/newjs/autotest/javascript_test_ext.rb