Skip to content

Commit

Permalink
Merge pull request #908 from bastelfreak/facterdb
Browse files Browse the repository at this point in the history
Support fact stringyfication
  • Loading branch information
bastelfreak authored Jun 15, 2024
2 parents 635ad46 + 8c26d72 commit 6673963
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
1 change: 1 addition & 0 deletions config_defaults.yml
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ spec/acceptance/nodesets/ec2/windows-2016-base-x64.yml:
delete: true
spec/spec_helper.rb:
add_mocked_facts: true
facterdb_string_keys: false
mock_with: false
spec/spec_helper_acceptance.rb:
unmanaged: true
Expand Down
3 changes: 1 addition & 2 deletions moduleroot/spec/spec_helper.rb.erb
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,16 @@
ENV['COVERAGE'] ||= 'yes' if Dir.exist?(File.expand_path('../lib', __dir__))

require 'voxpupuli/test/spec_helper'
<%- if @configs['hiera_config'] || @configs['mock_with'] -%>

RSpec.configure do |c|
c.facterdb_string_keys = <%= @configs['facterdb_string_keys'] %>
<%- if @configs['hiera_config'] -%>
c.hiera_config = <%= @configs['hiera_config'] %>
<%- end -%>
<%- if @configs['mock_with'] -%>
c.mock_with = <%= @configs['mock_with'] %>
<%- end -%>
end
<%- end -%>
<%- if @configs['add_mocked_facts'] -%>

add_mocked_facts!
Expand Down

0 comments on commit 6673963

Please sign in to comment.