Page Menu
Home
Software Heritage
Search
Configure Global Search
Log In
Files
F9338440
spec_helper.rb
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
755 B
Subscribers
None
spec_helper.rb
View Options
require
'puppetlabs_spec_helper/module_spec_helper'
RSpec
.
configure
do
|
c
|
c
.
mock_with
:rspec
do
|
mock
|
mock
.
syntax
=
[
:expect
,
:should
]
end
c
.
include
PuppetlabsSpec
::
Files
c
.
before
:each
do
# Store any environment variables away to be restored later
@old_env
=
{}
ENV
.
each_key
{
|
k
|
@old_env
[
k
]
=
ENV
[
k
]
}
if
ENV
[
'STRICT_VARIABLES'
]
==
'yes'
Puppet
.
settings
[
:strict_variables
]=
true
end
end
c
.
after
:each
do
PuppetlabsSpec
::
Files
.
cleanup
end
end
# Convenience helper for returning parameters for a type from the
# catalogue.
def
param
(
type
,
title
,
param
)
param_value
(
catalogue
,
type
,
title
,
param
)
end
# With rspec-puppet v2.0 this allows coverage checks.
#at_exit { RSpec::Puppet::Coverage.report! }
File Metadata
Details
Attached
Mime Type
text/x-ruby
Expires
Jul 4 2025, 8:48 AM (7 w, 3 h ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3320981
Attached To
rSPPG PostgreSQL puppet module
Event Timeline
Log In to Comment