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: integration_helper.rb
    path of file: ./repos/ohai/spec/support
    
    the code of the file until where you have to start completion: #
# License:: Apache License, Version 2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
    
  def when_plugins_directory(description, &block)
    context "When the plugins directory #{description}" do

      before do
        @plugins_directory = Dir.mktmpdir("ohai-plugins")
      end

      after do
        if @plugins_directory
          begin
            FileUtils.remove_entry_secure(@plugins_directory)
          ensure
            @plugins_directory = nil
          end
        end
      end