22. テストコード
簡単なテストコード
◦ 以下を確認
「httpd」パッケージがインストールされてい
ること
require 'spec_helper'
describe ("check httpd is installed") do
describe package("httpd") do
it { should be_installed }
end
end
27. テストコード
describe
◦ テストのグループを作るのに使う
◦ 実際のテストはdescribeブロックの中の
it、its文
describe ("check httpd service is enabled and running")
describe service("httpd") do
it { should be_running }
it { should be_enabled }
end
end