Sha256: 54d48adae37f7aaf6d4649a188a12e87f385996e83d1f7a588b16d0dc561bdc5
Contents?: true
Size: 1.14 KB
Versions: 2
Compression:
Stored size: 1.14 KB
Contents
require "spec_helper" describe A9n do subject { described_class } let(:env) { "test" } before { subject.app = double(env: env) subject.root = File.expand_path("../../../test_app", __FILE__) } after { subject.instance_variable_set(:@env, nil) subject.root = nil subject.app = nil } context "base config file" do it { expect(subject.default_dwarf).to eq("default dwarf") expect(subject.overriden_dwarf).to eq("already overriden dwarf") } end context "undefined env" do let(:env) { "tropical" } it { expect(subject.default_dwarf).to eq("default dwarf") expect(subject.overriden_dwarf).to eq("not yet overriden dwarf") } end context "extra config file" do it { expect(subject.mandrill).to be_kind_of(A9n::Struct) expect(subject.mandrill.username).to eq("joe") expect(subject.mandrill.api_key).to eq("asdf1234") } end context "extra config file with erb" do it { expect(subject.cloud).to be_kind_of(A9n::Struct) expect(subject.cloud.username).to eq("testuser") expect(subject.cloud.password).to eq("qwerty") } end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
a9n-0.3.3 | spec/integration/a9n_spec.rb |
a9n-0.3.2 | spec/integration/a9n_spec.rb |