Skip to content

Commit

Permalink
Repair failing unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
hartmantis committed Jan 12, 2016
1 parent d3f1f30 commit 3cc1f7f
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 9 deletions.
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ group :test do
gem 'kitchen-localhost'
gem 'kitchen-vagrant'
gem 'winrm-transport'
gem 'kitchen-docker'
end

group :integration do
Expand Down
4 changes: 2 additions & 2 deletions spec/libraries/provider_chef_dk_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -518,12 +518,12 @@
end

context 'Windows' do
let(:platform) { { platform: 'windows', version: '2012' } }
let(:platform) { { platform: 'windows', version: '2012R2' } }

it 'returns the correct params hash' do
expected = {
platform: 'windows',
platform_version: '6.2.9200',
platform_version: '6.3.9600',
machine_arch: 'x86_64',
version: nil,
prerelease: nil,
Expand Down
2 changes: 1 addition & 1 deletion spec/libraries/resource_chef_dk_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@
},
{
platform: 'windows',
version: '2012',
version: '2012R2',
expected: Chef::Provider::ChefDk::Windows
}
].each do |p|
Expand Down
14 changes: 8 additions & 6 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,14 @@
c.after(:suite) { FileUtils.rm_r(COOKBOOK_PATH) }
end

SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter[
Coveralls::SimpleCov::Formatter,
SimpleCov::Formatter::HTMLFormatter,
SimpleCov::Formatter::Console
]
SimpleCov.minimum_coverage 90
SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter.new(
[
Coveralls::SimpleCov::Formatter,
SimpleCov::Formatter::HTMLFormatter,
SimpleCov::Formatter::Console
]
)
SimpleCov.minimum_coverage(100)
SimpleCov.start

at_exit { ChefSpec::Coverage.report! }

0 comments on commit 3cc1f7f

Please sign in to comment.