Page Menu
Home
Software Heritage
Search
Configure Global Search
Log In
Files
F9343234
spec_helper.rb
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
753 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
# Ensure that we don't accidentally cache facts and environment
# between test cases.
Facter
::
Util
::
Loader
.
any_instance
.
stubs
(
:load_all
)
Facter
.
clear
Facter
.
clear_messages
# Store any environment variables away to be restored later
@old_env
=
{}
ENV
.
each_key
{
|
k
|
@old_env
[
k
]
=
ENV
[
k
]
}
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
File Metadata
Details
Attached
Mime Type
text/x-ruby
Expires
Fri, Jul 4, 1:22 PM (6 d, 11 h ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3288772
Attached To
rSPPG PostgreSQL puppet module
Event Timeline
Log In to Comment