Skip to content

Commit

Permalink
add root_home fact to all spec tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Garrett Rowell authored and Garrett Rowell committed Jun 28, 2016
1 parent 07cee64 commit 23d9666
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 6 deletions.
4 changes: 3 additions & 1 deletion spec/classes/cacti_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@
context "defaults + required params" do
let(:pre_condition) { "class {'cacti': #{required_params}}" }
let(:facts) do
facts
facts.merge({
:root_home => '/root',
})
end
it { should compile.with_all_deps }
it { should contain_class('cacti::params') }
Expand Down
4 changes: 3 additions & 1 deletion spec/classes/config_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@
context "on #{os}" do
let(:pre_condition) { "class {'cacti': #{required_params}}" }
let(:facts) do
facts
facts.merge({
:root_home => '/root',
})
end
let(:params) do
{
Expand Down
4 changes: 3 additions & 1 deletion spec/classes/install_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@
context "on #{os}" do
let(:pre_condition) { "class {'cacti': #{required_params}}" }
let(:facts) do
facts
facts.merge({
:root_home => '/root',
})
end
let(:params) do
{
Expand Down
4 changes: 3 additions & 1 deletion spec/classes/mysql_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@
context "on #{os}" do
let(:pre_condition) { "class {'cacti': #{required_params}}" }
let(:facts) do
facts
facts.merge({
:root_home => '/root',
})
end
let(:params) do
{
Expand Down
8 changes: 6 additions & 2 deletions spec/classes/service_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@
context "managed_services => #{services}" do
let(:pre_condition) { "class {'cacti': managed_services => #{services}, #{required_params}}" }
let(:facts) do
facts
facts.merge({
:root_home => '/root',
})
end
let(:params) do
{
Expand All @@ -38,7 +40,9 @@
context "managed_services => []" do
let(:pre_condition) { "class {'cacti': managed_services => [], #{required_params}}" }
let(:facts) do
facts
facts.merge({
:root_home => '/root',
})
end
let(:params) do
{
Expand Down

0 comments on commit 23d9666

Please sign in to comment.