Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- require 'spec_helper'
- require 'cronenberg/config'
- require 'rspec/mocks/standalone'
- describe Cronenberg::Config do
- context "#initialize" do
- let(:config_hash) do
- {
- host: 'vsphere.pizza.com',
- user: 'pizzamaster5000',
- password: 'pizzapass',
- }
- end
- context "with no env variables or config file" do
- it "should raise a RunTime error" do
- expect{ Cronenberg::Config.new }.to raise_error(RuntimeError)
- end
- end
- context "with a valid configuration hash" do
- before do
- expect(Cronenberg::Config).to receive(:process_environment_variables).and_return config_hash
- end
- it "returns valid config items" do
- config = Cronenberg::Config.new
- end
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement