def virtualenv?
      pip_path = ::File.join(@name, 'bin', 'pip')
      python_path = ::File.join(@name, 'bin', 'python')
      act_path = ::File.join(@name, 'bin', 'activate')
      cmd = "grep -q 'export VIRTUAL_ENV' #{act_path}"
      @runner.check_file_is_executable(pip_path, 'owner') and
        @runner.check_file_is_executable(python_path, 'owner') and
        @runner.check_file_is_readable(act_path, 'owner') and
        @runner.run_command(cmd).exit_status.to_i == 0
    end
def virtualenv?
      pip_path = ::File.join(@name, 'bin', 'pip')
      python_path = ::File.join(@name, 'bin', 'python')
      act_path = ::File.join(@name, 'bin', 'activate')
      cmd = "grep -q 'export VIRTUAL_ENV' #{act_path}"
      @runner.check_file_is_executable(pip_path, 'owner') and
        @runner.check_file_is_executable(python_path, 'owner') and
        @runner.check_file_is_readable(act_path, 'owner') and
        @runner.run_command(cmd).exit_status.to_i == 0
    end
Test whether this appears to be a working venv

 Tests performed:
 - venv_path/bin/pip executable by owner?
 - venv_path/bin/python executable by owner?
 - venv_path/bin/activate readable by owner?
 - 'export VIRTUAL_ENV' in venv_path/bin/activate?

 @example
   describe virtualenv('/path/to/venv') do
     it { should be_virtualenv }
   end

 @api public
 @return [Boolean]