0
私はシェフとルビーに慣れていないし、トレーニングプロジェクトで働いていて、おそらく非常にシンプルですが、私はGoogle検索やビートに力を尽くしてしまいました提出する。私は、次のリソース...シェフ|ディレクトリ権限の指定のためのスペックを書く
directory node['tcbuildagent']['toolsfolderpath'] do
action :create
owner 'BUILTIN\\Administrators'
group 'BUILTIN\\Administrators'
rights :read_execute, 'Everyone', applies_to_children: true
end
を持っている...と私のスペックは、私は得ることができない私の人生のために...
it 'creates creates tools directory' do
expect(chef_run).to create_directory('c:\fakepathone').with(
owner: 'BUILTIN\\Administrators',
group: 'BUILTIN\\Administrators',
rights: [{ permissions: 'read_execute', principals: 'Everyone', applies_to_children: true }]
)
エンド
...のように見えます権利部分のテストを行います。私の最近のエラーは...
1) tcbuildagent::default creates creates tools directory
Failure/Error:
expect(chef_run).to create_directory('c:\fakepathone').with(
owner: 'BUILTIN\\Administrators',
group: 'BUILTIN\\Administrators',
rights: [{ permissions: 'read_execute', principals: 'Everyone', applies_to_children: true }]
)
expected "directory[c:\fakepathone]" to have parameters:
rights [{:permissions=>"read_execute", :principals=>"Everyone", :applies_to_children=>true}], was [{:permissions=>:read_execute, :principals=>"Everyone", :applies_to_children=>true}]
Diff:
@@ -1,4 +1,4 @@
-[{:permissions=>"read_execute",
+[{:permissions=>:read_execute,
:principals=>"Everyone",
:applies_to_children=>true}]
# ./spec/unit/recipes/default_spec.rb:19:in `block (2 levels) in <top (required)>'
...私は途中で多くのエラーを見ました。
私はここで何が欠けていますか?ありがとう。
私はそれが何かばかげたことを知っていました。ありがとう。 –