Page Menu
Home
Software Heritage
Search
Configure Global Search
Log In
Files
F8393957
keys_spec.rb
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
564 B
Subscribers
None
keys_spec.rb
View Options
#! /usr/bin/env ruby -S rspec
require
'spec_helper_acceptance'
describe
'keys function'
do
describe
'success'
do
pp
=
<<-
EOS
$a = {'aaa'=>'bbb','ccc'=>'ddd'}
$o = keys($a)
notice(inline_template('keys is <%= @o.sort.inspect %>'))
EOS
it
'keyss hashes'
do
apply_manifest
(
pp
,
catch_failures
:
true
)
do
|
r
|
expect
(
r
.
stdout
)
.
to
match
(
%r{keys is \["aaa", "ccc"\]}
)
end
end
it
'handles non hashes'
it
'handles empty hashes'
end
describe
'failure'
do
it
'handles improper argument counts'
end
end
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Jun 4, 7:19 PM (4 d, 7 h ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3399073
Attached To
rSPSTD puppet-puppetlabs-stdlib
Event Timeline
Log In to Comment