You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: test_link_collector.rb
    path of file: ./repos/nanoc/nanoc-checking/test/nanoc/checking
    
    the code of the file until where you have to start completion: # frozen_string_literal: true

require 'helper'

module Nanoc
  module Checking
    class LinkCollectorTest < Nanoc::TestCase
      def test_all
        # Create dummy data
        FileUtils.mkdir_p('testdir')
        file_a = File.join(Dir.pwd, 'file-a.html')
        file_b = File.join(Dir.pwd, 'testdir', 'file-b.html')
        File.open(file_a, 'w') do |io|
       
    
      def test_protocol_relative_urls
        File.write('a.html', '<a href="//example.com/broken">broken</a>')

        external_collector =
          Nanoc::Checking::LinkCollector.new(['a.html'], :external)

        internal_collector =
          Nanoc::Checking::LinkCollector.new(['a.html'], :internal)

        hrefs = external_collector.filenames_per_href.keys

        assert_includes hrefs, '//example.com/broken'
        refute_includes hrefs, 'http://example.com/broken'
        refute_includes hrefs, 'file:///example.com/broken'
        refute_includes hrefs, 'file://example.com/broken'

        hrefs = internal_collector.filenames_per_href.keys

        refute_includes hrefs, '//example.com/broken'
        refute_includes hrefs, 'http://example.com/broken'
        refute_includes hrefs, 'file:///example.com/broken'
        refute_includes hrefs, 'file://example.com/broken'
      end