Sha256: 70ae83d9983d2af52f3c8328ef5a2221cceda9bd025516bb5ed30d3a69c386ac

Contents?: true

Size: 531 Bytes

Versions: 40

Compression:

Stored size: 531 Bytes

Contents

require "spec_helper"
require "shelly/ssh_keys"

describe Shelly::SshKeys do
  let(:keys) { Shelly::SshKeys.new }
  before { FileUtils.mkdir_p('~/.ssh') }
  describe "#prefered_key" do
    context "dsa key exists" do
      before { FileUtils.touch("~/.ssh/id_dsa.pub") }
      it "should return dsa key" do
        keys.prefered_key.path.should match(/dsa/)
      end
    end
    context "dsa key doesn't exists" do
      it "should return rsa key" do
        keys.prefered_key.path.should match(/rsa/)
      end
    end
  end
end

Version data entries

40 entries across 40 versions & 1 rubygems

Version Path
shelly-0.5.7 spec/shelly/ssh_keys_spec.rb
shelly-0.5.6 spec/shelly/ssh_keys_spec.rb
shelly-0.5.5 spec/shelly/ssh_keys_spec.rb
shelly-0.5.4 spec/shelly/ssh_keys_spec.rb
shelly-0.5.3 spec/shelly/ssh_keys_spec.rb
shelly-0.5.2 spec/shelly/ssh_keys_spec.rb
shelly-0.5.1 spec/shelly/ssh_keys_spec.rb
shelly-0.5.0 spec/shelly/ssh_keys_spec.rb
shelly-0.4.42 spec/shelly/ssh_keys_spec.rb
shelly-0.4.41 spec/shelly/ssh_keys_spec.rb
shelly-0.4.40 spec/shelly/ssh_keys_spec.rb
shelly-0.4.39 spec/shelly/ssh_keys_spec.rb
shelly-0.4.38 spec/shelly/ssh_keys_spec.rb
shelly-0.4.37 spec/shelly/ssh_keys_spec.rb
shelly-0.4.36 spec/shelly/ssh_keys_spec.rb
shelly-0.4.35 spec/shelly/ssh_keys_spec.rb
shelly-0.4.34 spec/shelly/ssh_keys_spec.rb
shelly-0.4.33 spec/shelly/ssh_keys_spec.rb
shelly-0.4.32 spec/shelly/ssh_keys_spec.rb
shelly-0.4.31 spec/shelly/ssh_keys_spec.rb