Skip to content

Commit

Permalink
Update Chefspec to actually mock out Windows ohai data
Browse files Browse the repository at this point in the history
Also exclude deprecation warnings during the chefspec runs

Signed-off-by: Tim Smith <tsmith@chef.io>
  • Loading branch information
tas50 committed Aug 16, 2016
1 parent 0e1c3f9 commit 17df850
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
4 changes: 3 additions & 1 deletion spec/default_spec.rb
@@ -1,7 +1,9 @@
require_relative 'spec_helper'

describe 'windows::default' do
let(:chef_run) { ChefSpec::SoloRunner.converge(described_recipe) }
let(:runner) { ChefSpec::ServerRunner.new(platform: 'windows', version: '2012R2') }
let(:chef_run) { runner.converge('windows::default') }


%w( win32-api win32-service ).each do |win_gem|
it "installes precompiled binary of #{win_gem} gem" do
Expand Down
5 changes: 5 additions & 0 deletions spec/spec_helper.rb
@@ -1,2 +1,7 @@
require 'chefspec'
require 'chefspec/berkshelf'

RSpec.configure do |config|
config.color = true
config.log_level = :error
end

0 comments on commit 17df850

Please sign in to comment.