Sha256: cb7c06e61019cae0a0749dfd03ed02858e6ee762d2dbcf92ad31e01e2c72bbbd
Contents?: true
Size: 1.02 KB
Versions: 1
Compression:
Stored size: 1.02 KB
Contents
require 'spec_helper' describe 'resource_reference_without_title_capital' do context 'a proper reference' do let(:msg) { 'whitespce between reference type and title' } let(:code) { "file { 'foo': ensure => file, notify => Title['one'],}" } it 'should detect no problem' do expect(problems).to have(0).problem end end context 'a proper reference in quotes' do let(:msg) { 'whitespce between reference type and title' } let(:code) { "file { 'foo': ensure => file, notify => Title['One'],}" } it 'should detect no problem' do expect(problems).to have(0).problem end end context 'resource reference with title as capital letter' do let(:msg) { 'resource reference with title with capital letter' } let(:code) { "file { 'foo': ensure => file, notify => Title[One],}" } it 'should only detect a single problem' do expect(problems).to have(1).problem end it 'should create an error' do expect(problems).to contain_error(msg).on_line(1) end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
puppet-lint-resource_reference_syntax-1.0.2 | spec/puppet-lint/plugins/resource_reference_without_title_capital_spec.rb |