Page Menu
Home
Software Heritage
Search
Configure Global Search
Log In
Files
F11012678
hash_spec.rb
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
652 B
Subscribers
None
hash_spec.rb
View Options
require
'spec_helper'
if
Puppet
::
Util
::
Package
.
versioncmp
(
Puppet
.
version
,
'4.5.0'
)
>=
0
describe
'Stdlib::Compat::Hash'
do
describe
'accepts hashes'
do
[
{},
{
'one'
=>
'two'
},
{
'wan'
=>
3
},
{
'001'
=>
'helly'
},
].
each
do
|
value
|
describe
value
.
inspect
do
it
{
is_expected
.
to
allow_value
(
value
)
}
end
end
end
describe
'rejects other values'
do
[
''
,
'one'
,
'1'
,
[]
,
].
each
do
|
value
|
describe
value
.
inspect
do
it
{
is_expected
.
not_to
allow_value
(
value
)
}
end
end
end
end
end
File Metadata
Details
Attached
Mime Type
text/x-ruby
Expires
Thu, Sep 18, 4:28 AM (17 h, 55 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3405761
Attached To
rSPSTD puppet-puppetlabs-stdlib
Event Timeline
Log In to Comment