Sha256: d683725a228a9a4ee516df66eb74b1b16b7a8677697f327fedafd16b4bc308e0

Contents?: true

Size: 716 Bytes

Versions: 3

Compression:

Stored size: 716 Bytes

Contents

require 'spec_helper'

describe 'variable_contains_upcase' do
  let(:msg) { 'variable contains a capital letter' }

  context 'a variable containing a capital' do
    let(:code) { '$fOobar' }

    it 'should only detect a single problem' do
      expect(problems).to have(1).problem
    end

    it 'should create a warning' do
      expect(problems).to contain_warning(msg).on_line(1).in_column(1)
    end
  end

  context 'variable containing a capital' do
    let(:code) { '" $fOobar"' }

    it 'should only detect a single problem' do
      expect(problems).to have(1).problem
    end

    it 'should create a warning' do
      expect(problems).to contain_warning(msg).on_line(1).in_column(3)
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
puppet-lint-variable_contains_upcase-1.0.2 spec/puppet-lint/plugins/variable_contains_upcase_spec.rb
puppet-lint-variable_contains_upcase-1.0.1 spec/puppet-lint/plugins/variable_contains_upcase_spec.rb
puppet-lint-variable_contains_upcase-1.0.0 spec/puppet-lint/plugins/variable_contains_upcase_spec.rb