Sha256: edbe2519daa21590ae9702f272d934cb454c2c3537688901e75d3511d37d9181

Contents?: true

Size: 728 Bytes

Versions: 9

Compression:

Stored size: 728 Bytes

Contents

# frozen_string_literal: true

require "simplecov"
SimpleCov.start

ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__)
require "bundler/setup"
require "minitest/autorun"
require "minitest/utils"
require "browser"
require "browser/testing"
require "yaml"

module Minitest
  class Test
    setup do
      Browser::Bot.instance_variable_set("@detect_empty_ua", false)
    end

    def assert_deprecated(message, file, line, &block)
      message = "#{message} (called from #{file}:#{line})"
      _out, err = capture_io(&block)
      assert_includes err, message
    end
  end
end

# Override Browser::Base#warn, so we don't output deprecation messages.
module Browser
  class Base
    def warn(*)
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
browser-5.3.1 test/test_helper.rb
browser-5.3.0 test/test_helper.rb
browser-5.2.0 test/test_helper.rb
browser-5.1.0 test/test_helper.rb
browser-5.0.0 test/test_helper.rb
browser-4.2.0 test/test_helper.rb
browser-4.1.0 test/test_helper.rb
browser-4.0.0 test/test_helper.rb
browser-3.0.3 test/test_helper.rb