Sha256: 7cf9fe08ac9a0761b9f4120e4a165c79d08b36031d21d0ef5a920a7e193d65fc
Contents?: true
Size: 1.06 KB
Versions: 10
Compression:
Stored size: 1.06 KB
Contents
require 'spec_helper' require 'chef/provisioning/fog_driver' describe Chef::Provisioning::FogDriver do describe ".from_url" do subject { Chef::Provisioning::FogDriver.from_provider('TestDriver', {}) } it "should return the correct class" do expect(subject).to be_an_instance_of Chef::Provisioning::FogDriver::Providers::TestDriver end it "should call the target compute_options_for" do expect(Chef::Provisioning::FogDriver::Providers::TestDriver).to receive(:compute_options_for) .with('TestDriver', anything, {}).and_return([{}, 'test']).twice subject end end describe "when creating a new class" do it "should return the correct class" do test = Chef::Provisioning::FogDriver.new('fog:TestDriver:foo', {}) expect(test).to be_an_instance_of Chef::Provisioning::FogDriver::Providers::TestDriver end it "should populate config" do test = Chef::Provisioning::FogDriver.new('fog:TestDriver:foo', {test: "chef_provisioning"}) expect(test.config[:test]).to eq "chef_provisioning" end end end
Version data entries
10 entries across 10 versions & 1 rubygems