<commit_before>require "spec_helper"

$:.push(File.expand_path(File.join(File.dirname(__FILE__), %w{.. .. .. util mount})))
require 'miq_generic_mount_session'

describe MiqGenericMountSession do
  context "#connect" do
    before do
      MiqGenericMountSession.stub(:raw_disconnect)
      @s1 = MiqGenericMountSession.new({:uri => '/tmp/abc'})
      @s2 = MiqGenericMountSession.new({:uri => '/tmp/abc'})
    end

    after do
      @s1.disconnect
      @s2.disconnect
    end

    it "is unique" do
      MiqGenericMountSession.should_receive(:base_mount_point).twice.and_return('/tmp')
      @s1.connect
      @s2.connect
    end
  end
end
<commit_msg>suppress mount warnings in specs<commit_after>require "spec_helper"

$:.push(File.expand_path(File.join(File.dirname(__FILE__), %w{.. .. .. util mount})))
require 'miq_generic_mount_session'

describe MiqGenericMountSession do
  context "#connect" do
    before do
      MiqGenericMountSession.stub(:raw_disconnect)
      @s1 = MiqGenericMountSession.new({:uri => '/tmp/abc'})
      @s2 = MiqGenericMountSession.new({:uri => '/tmp/abc'})

      @s1.logger = Logger.new("/dev/null")
      @s2.logger = Logger.new("/dev/null")
    end

    after do
      @s1.disconnect
      @s2.disconnect
    end

    it "is unique" do
      MiqGenericMountSession.should_receive(:base_mount_point).twice.and_return('/tmp')
      @s1.connect
      @s2.connect
    end
  end
end

{'fraction_non_alphanumeric': 0.1368124118476728, 'fraction_numerical': 0.009873060648801129, 'mean_word_length': 3.2740963855421685, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3829430', 'n_tokens_mistral': 496, 'n_tokens_neox': 487, 'n_words': 86}