Skip to content

Commit

Permalink
Add gem_install_options test
Browse files Browse the repository at this point in the history
Also changed .fixtures.yml to use https not git protocol.
This helps people behind firewalls run the tests.
  • Loading branch information
alexjfisher committed Apr 18, 2017
1 parent 0199f7d commit c8eafe7
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .fixtures.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ fixtures:
symlinks:
"hiera": "#{source_dir}"
repositories:
"stdlib": "git://github.com/puppetlabs/puppetlabs-stdlib.git"
"inifile": "git://github.com/puppetlabs/puppetlabs-inifile.git"
"stdlib": "https://github.com/puppetlabs/puppetlabs-stdlib.git"
"inifile": "https://github.com/puppetlabs/puppetlabs-inifile.git"
34 changes: 34 additions & 0 deletions spec/defines/install_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
require 'spec_helper'

describe 'hiera::install' do
let :pre_condition do
[
'include ::hiera'
]
end
describe 'installing hiera-eyaml' do
let :title do
'hiera-eyaml'
end
let(:params) { {
'gem_name' => 'hiera-eyaml',
'provider' => 'puppetserver_gem'
} }
it { is_expected.to contain_package('hiera-eyaml').with(
'name' => 'hiera-eyaml'
)}
it { is_expected.to contain_package('hiera-eyaml').without_install_options }

context 'with gem_install_options' do
let :pre_condition do
[
'class { "hiera": gem_install_options => ["--http_proxy","http://proxy.example.com:3128"]}'
]
end
it { is_expected.to contain_package('hiera-eyaml').with(
'name' => 'hiera-eyaml',
'install_options' => ['--http_proxy', 'http://proxy.example.com:3128'],
)}
end
end
end

0 comments on commit c8eafe7

Please sign in to comment.