Sha256: bfe5434aa9820e0f3a47b324fc36f9dc5a5b7be9d1a2551a6fb6fd5927cd5e3f

Contents?: true

Size: 816 Bytes

Versions: 7

Compression:

Stored size: 816 Bytes

Contents

require 'spec_helper'

describe Outliers::Credentials do
  subject { Outliers::Credentials }
  let(:credentials1) { fixture_file 'credentials1.yml' }
  let(:credentials2) { fixture_file 'credentials2.yml' }

  context "#load_from_file" do
    it "should load the credentials from the given yaml file" do
      File.should_receive(:read).with('/home/user/outliers.yml').and_return credentials1
      results = { "test_credentials_1" => 
                  { "region"            => "us-west-1",
                    "provider"          => "aws_ec2", 
                    "access_key_id"     => "01234567890123456789",
                    "secret_access_key" =>"0123456789012345678901234567890123456789" }
                }
      expect(subject.load_from_file '/home/user/outliers.yml').to eq(results)
    end
  end

end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
outliers-0.3.3 spec/credentials_spec.rb
outliers-0.3.2 spec/credentials_spec.rb
outliers-0.3.1 spec/credentials_spec.rb
outliers-0.3.0 spec/credentials_spec.rb
outliers-0.2.0 spec/credentials_spec.rb
outliers-0.1.1 spec/credentials_spec.rb
outliers-0.1.0 spec/credentials_spec.rb