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.4.30 spec/shelly/ssh_keys_spec.rb
shelly-0.4.29 spec/shelly/ssh_keys_spec.rb
shelly-0.4.29.pre spec/shelly/ssh_keys_spec.rb
shelly-0.4.28 spec/shelly/ssh_keys_spec.rb
shelly-0.4.28.pre2 spec/shelly/ssh_keys_spec.rb
shelly-0.4.28.pre spec/shelly/ssh_keys_spec.rb
shelly-0.4.27 spec/shelly/ssh_keys_spec.rb
shelly-0.4.26 spec/shelly/ssh_keys_spec.rb
shelly-0.4.26.pre spec/shelly/ssh_keys_spec.rb
shelly-0.4.25 spec/shelly/ssh_keys_spec.rb
shelly-0.4.24 spec/shelly/ssh_keys_spec.rb
shelly-0.4.23 spec/shelly/ssh_keys_spec.rb
shelly-0.4.23.pre spec/shelly/ssh_keys_spec.rb
shelly-0.4.22 spec/shelly/ssh_keys_spec.rb
shelly-0.4.21 spec/shelly/ssh_keys_spec.rb
shelly-0.4.19 spec/shelly/ssh_keys_spec.rb
shelly-0.4.18 spec/shelly/ssh_keys_spec.rb
shelly-0.4.17 spec/shelly/ssh_keys_spec.rb
shelly-0.4.16 spec/shelly/ssh_keys_spec.rb
shelly-0.4.15 spec/shelly/ssh_keys_spec.rb