Sha256: 275081e7384ba856079e916547cb602ffed1119aa1022c372ceba9c46d726652

Contents?: true

Size: 989 Bytes

Versions: 7

Compression:

Stored size: 989 Bytes

Contents

require 'spec_helper'

describe Ridley::Client do
  let(:server_url) { "https://api.opscode.com" }
  let(:client_name) { "fake" }
  let(:client_key) { fixtures_path.join("my-fake.pem").to_s }
  let(:ssh) { {user: "fake", password: "password1", port: "222"} }
  let(:winrm) { {user: "fake", password: "password2", port: "5986"} }
  let(:config) do
    {
      server_url: server_url,
      client_name: client_name,
      client_key: client_key,
      ssh: ssh,
      winrm: winrm
    }
  end

  describe "ClassMethods" do
    describe "::initialize" do
      subject { described_class.new(options) }

      it "assigns a 'ssh' attribute from the given 'ssh' option" do
        described_class.new(config).ssh.should eql({user: "fake", password: "password1", port: "222"})
      end

      it "assigns a 'winrm' attribute from the given 'winrm' option" do
        described_class.new(config).winrm.should eql({user: "fake", password: "password2", port: "5986"})
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
ridley-connectors-2.3.1 spec/unit/ridley-connectors/client_spec.rb
ridley-connectors-2.3.0 spec/unit/ridley-connectors/client_spec.rb
ridley-connectors-2.2.0 spec/unit/ridley-connectors/client_spec.rb
ridley-connectors-2.1.2 spec/unit/ridley-connectors/client_spec.rb
ridley-connectors-2.1.1 spec/unit/ridley-connectors/client_spec.rb
ridley-connectors-2.1.0 spec/unit/ridley-connectors/client_spec.rb
ridley-connectors-2.0.1 spec/unit/ridley-connectors/client_spec.rb