0
메인터치하는 방법 rspec-puppet을 사용하여 정의 하시겠습니까?
define hello::world {
file { "/tmp/helloworld${name}": }
}
테스트
require 'spec_helper'
describe 'hello::world' do
let(:title) { '0' }
context 'test' do
let(:title) { '0' }
it do
should contain_file("/tmp/helloworld0")
end
end
end
at_exit { RSpec::Puppet::Coverage.report! }
결과
[[email protected]] sudo rspec
.
Finished in 0.26947 seconds
1 example, 0 failures
Total resources: 2
Touched resources: 1
Resource coverage: 50.00%
Untouched resources:
hello::world[0]
it { should contain_define('hello::world[0]') }
또는
it { should contain_class('hello::world[0]') }
방법 RSpec에-꼭두각시를 사용하여 정의를 만지지 질문?