結論:みあたらないので誰か
Last active
August 29, 2015 14:06
-
-
Save sonots/b806e5e6beeedf69570a to your computer and use it in GitHub Desktop.
why-run でテストできない事象はあるのか
Author
Author
これはできない。
execute "hack the planet" do
command "/bin/echo HACKING THE PLANET > foo"
endが、only_if/not_if をちゃんと書けば、only_if/not_if がテストになるので、why-run でテストできる。
execute "hack the planet" do
command "/bin/echo HACKING THE PLANET > foo"
not_if "/usr/bin/test -e foo"
endちゃんと中身までチェックするならそういう not_if にしないといけない。
Author
FileEdit でファイルの内容を置換した場合は、why-run で確認できるのか??
=> これも only_if 次第
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
依存しているようなものがある場合、2つ目は最初にちゃんとチェックされない。
が、package インストールされている状態で why-run すればチェックされる。
ので、あるべき姿になっているかのテストは why-run で十分できそう(全部通れば良い)