-
Notifications
You must be signed in to change notification settings - Fork 611
/
Copy pathruby_spec.rb
53 lines (40 loc) · 1.24 KB
/
ruby_spec.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# frozen_string_literal: true
require 'spec_helper'
provider_class = Puppet::Type.type(:postgresql_conf).provider(:ruby)
describe provider_class do
let(:resource) { Puppet::Type.type(:postgresql_conf).new(name: 'foo', value: 'bar') }
let(:provider) { resource.provider }
it 'has a method parse_config' do
expect(provider).to respond_to(:parse_config)
end
it 'has a method delete_header' do
expect(provider).to respond_to(:delete_header)
end
it 'has a method add_header' do
expect(provider).to respond_to(:add_header)
end
it 'has a method exists?' do
expect(provider).to respond_to(:exists?)
end
it 'has a method create' do
expect(provider).to respond_to(:create)
end
it 'has a method destroy' do
expect(provider).to respond_to(:destroy)
end
it 'has a method value' do
expect(provider).to respond_to(:value)
end
it 'has a method value=' do
expect(provider).to respond_to(:value=)
end
it 'has a method comment' do
expect(provider).to respond_to(:comment)
end
it 'has a method comment=' do
expect(provider).to respond_to(:comment=)
end
it 'is an instance of the Provider Ruby' do
expect(provider).to be_an_instance_of Puppet::Type::Postgresql_conf::ProviderRuby
end
end