<commit_before>require "." / "lib" / "resolvers" / "ssh_resolver"

describe WarningShot::SshResolver do

  it 'should have tests registered' do
    WarningShot::SshResolver.tests.empty?.should be(false)
  end

  it 'should have resolutions registered' do
    WarningShot::SshResolver.resolutions.empty?.should be(false)
  end
     
  describe 'with healing enabled' do
    describe 'with heal instructions' do
      it 'should install the public key on the local user (rm your own pubkey from ~/.ssh/authorized_keys2 to pass)' do
        fd = WarningShot::SshResolver.new({:hostname => 'localhost', :username => ENV['USER']})
        fd.test!
        fd.failed.length.should be(1)
        fd.resolve!
        fd.resolved.length.should be(1)

        fd = WarningShot::SshResolver.new({:hostname => 'localhost', :username => ENV['USER']})
        fd.test!<commit_msg>updated the test to pending with instructions on how to run<commit_after>require "." / "lib" / "resolvers" / "ssh_resolver"

describe WarningShot::SshResolver do

  it 'should have tests registered' do
    WarningShot::SshResolver.tests.empty?.should be(false)
  end

  it 'should have resolutions registered' do
    WarningShot::SshResolver.resolutions.empty?.should be(false)
  end
     
  describe 'with healing enabled' do
    describe 'with heal instructions' do
      it 'should install the public key on the local user' do
        pending "rm your own pubkey from ~/.ssh/authorized_keys2 to run"
        fd = WarningShot::SshResolver.new({:hostname => 'localhost', :username => ENV['USER']})
        fd.test!
        fd.failed.length.should be(1)
        fd.resolve!
        fd.resolved.length.should be(1)

        fd = WarningShot::SshResolver.new({:hostname => 'localhost', :username => ENV['USER']})
        fd.test!
{'fraction_non_alphanumeric': 0.11935303959843838, 'fraction_numerical': 0.0033463469046291134, 'mean_word_length': 3.3125, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 11, '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': '4814787', 'n_tokens_mistral': 555, 'n_tokens_neox': 532, 'n_words': 152}