Sha256: 8014e2cab2307737363b9a5b11816042daf86bf6489a80d4bb2b1ada50e422ed

Contents?: true

Size: 711 Bytes

Versions: 3

Compression:

Stored size: 711 Bytes

Contents

require 'spec_helper'
require 'yaml'

describe AwsAlertMonitor::Config do
  before do
    @data = "app:\n  access_key: key \n  secret_key: secret\n  region: us-west-1\n  sqs_endpoint: https://sqs.us-west-1.amazonaws.com/123456789012/app\n  events: \n    'autoscaling:EC2_INSTANCE_LAUNCH':\n      email:\n        source: brett_weaver@intuit.com\n        destination: brett_weaver@intuit.com\n"
    File.stub :exists? => true
    File.should_receive(:open).
         with("#{ENV['HOME']}/.aws-alert-monitor.yml").
         and_return @data
  end

  it "should load the configuration from ~/.aws-alert-monitor.yml" do
    @config = AwsAlertMonitor::Config.new
    @config.file.should == YAML.load(@data)
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
aws-alert-monitor-0.1.0 spec/config_spec.rb
aws-alert-monitor-0.0.5 spec/config_spec.rb
aws-alert-monitor-0.0.4 spec/config_spec.rb