spec/lib/capsulecd/chef/chef_engine_spec.rb in capsulecd-1.0.0 vs spec/lib/capsulecd/chef/chef_engine_spec.rb in capsulecd-1.0.1

- old
+ new

@@ -56,9 +56,25 @@ engine.test_step end end end + describe '#release_step' do + let(:engine) do + require 'capsulecd/chef/chef_engine' + CapsuleCD::Chef::ChefEngine.new(source: :github, + package_type: :chef) + end + let(:config_double) { CapsuleCD::Configuration.new } + describe 'when no chef_supermarket_username or chef_supermarket_key provided' do + it 'should raise an error' do + engine.instance_variable_set(:@config, config_double) + + expect{engine.release_step}.to raise_error(CapsuleCD::Error::ReleaseCredentialsMissing) + end + end + end + describe 'integration tests' do let(:engine) do require 'capsulecd/chef/chef_engine' CapsuleCD::Chef::ChefEngine.new(source: :github, runner: :default,