def check_unexpected_files(&block)
      expected_files = glob_all after_path
      produced_files = glob_all
      unexpected_files = produced_files - expected_files

      # Select only files
      unexpected_files.select! { |path| path.file? }

      # Filter ignored paths
      unexpected_files.reject! { |path| context.ignores?(path) }

      block.call unexpected_files
    end
def check_unexpected_files(&block)
      expected_files = glob_all after_path
      produced_files = glob_all
      unexpected_files = produced_files - expected_files

      # Select only files
      unexpected_files.select! { |path| path.file? }

      # Filter ignored paths
      unexpected_files.reject! { |path| context.ignores?(path) }

      block.call unexpected_files
    end
Compares the expected and produced directory by using the rules
 defined in the context for unexpected files.

 This is separate because you probably don't want to define an extra
 test case for each file, which wasn't expected at all. So you can
 keep your test cases consistent.

 @param  [Block<(Array)->()>] diff_block
         The block, where you will likely define a test that no unexpected files exists.
         It will receive an Array.