diff options
author | Jay Mundrawala <jdmundrawala@gmail.com> | 2014-10-20 14:09:12 -0700 |
---|---|---|
committer | Jay Mundrawala <jdmundrawala@gmail.com> | 2014-10-22 12:25:48 -0700 |
commit | df8d6e914999adcb44cf5052afbe276b126181b7 (patch) | |
tree | 34ea652ce83e8e3fa5d545b41cf7f0b1d75603ad /spec/unit/util | |
parent | a2128b7aaa5ad494ea17559cfe3796f2cb2e5e6c (diff) | |
download | chef-df8d6e914999adcb44cf5052afbe276b126181b7.tar.gz |
Added spec to test a whatif expception with \r\n is corrrectly classifiedjdmundrawala/issue-2225
Diffstat (limited to 'spec/unit/util')
-rw-r--r-- | spec/unit/util/dsc/local_configuration_manager_spec.rb | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/spec/unit/util/dsc/local_configuration_manager_spec.rb b/spec/unit/util/dsc/local_configuration_manager_spec.rb index f630ac89d8..eb27e9e94e 100644 --- a/spec/unit/util/dsc/local_configuration_manager_spec.rb +++ b/spec/unit/util/dsc/local_configuration_manager_spec.rb @@ -32,7 +32,7 @@ EOH } let(:no_whatif_lcm_output) { <<-EOH -Start-DscConfiguration : A parameter cannot be found that matches parameter name 'whatif'. +Start-DscConfiguration : A parameter cannot be found\r\n that matches parameter name 'whatif'. At line:1 char:123 + run-somecommand -whatif + ~~~~~~~~ @@ -77,8 +77,13 @@ EOH let(:lcm_standard_error) { no_whatif_lcm_output } let(:lcm_cmdlet_success) { false } + it 'returns true when passed to #whatif_not_supported?' do + expect(lcm.send(:whatif_not_supported?, no_whatif_lcm_output)).to be_true + end + it 'should should return a (possibly empty) array of ResourceInfo instances' do expect(Chef::Log).to receive(:warn) + expect(lcm).to receive(:whatif_not_supported?).and_call_original test_configuration_result = nil expect {test_configuration_result = lcm.test_configuration('config')}.not_to raise_error expect(test_configuration_result.class).to be(Array) |