Sha256: fba3e6b0583332cd76376e1f21b1231579d948fc49b9e6567143842e3c35fefc

Contents?: true

Size: 1.04 KB

Versions: 16

Compression:

Stored size: 1.04 KB

Contents

# Copyright Swipely, Inc.  All rights reserved.

require 'spec_helper'

describe Aerosol do
  subject { Aerosol }

  {
    :auto_scaling => Aerosol::AutoScaling,
    :deploy => Aerosol::Deploy,
    :launch_configuration => Aerosol::LaunchConfiguration,
    :ssh => Aerosol::Connection
  }.each do |name, klass|
    describe ".#{name}" do
      before { subject.send(name, :"runner_test_#{name}") { } }

      it "creates a new #{klass}" do
        expect(klass.instances.keys).to include(:"runner_test_#{name}")
      end

      it "accessible via #{klass} without a block " do
        expect(subject.send("#{name}s").keys).to include(:"runner_test_#{name}")
      end
    end
  end

  it { should be_an_instance_of(Module) }

  describe ".namespace" do
    let(:namespace) { "test" }
    before { subject.namespace namespace }

    it "sets the namespace" do
      expect(subject.instance_variable_get(:"@namespace")).to eq(namespace)
    end

    it "returns the namespace after being set" do
      expect(subject.namespace).to eq(namespace)
    end
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
aerosol-1.10.0 spec/aerosol_spec.rb
aerosol-1.9.2 spec/aerosol_spec.rb
aerosol-1.9.1 spec/aerosol_spec.rb
aerosol-1.9.0 spec/aerosol_spec.rb
aerosol-1.8.0 spec/aerosol_spec.rb
aerosol-1.7.1 spec/aerosol_spec.rb
aerosol-1.7.0 spec/aerosol_spec.rb
aerosol-1.7.0.pre.1 spec/aerosol_spec.rb
aerosol-1.6.0 spec/aerosol_spec.rb
aerosol-1.5.1 spec/aerosol_spec.rb
aerosol-1.3.0 spec/aerosol_spec.rb
aerosol-1.2.0 spec/aerosol_spec.rb
aerosol-1.1.0 spec/aerosol_spec.rb
aerosol-1.0.2 spec/aerosol_spec.rb
aerosol-1.0.1 spec/aerosol_spec.rb
aerosol-0.5.1 spec/aerosol_spec.rb