Sha256: d07514b098a413e65a867654cf3a0cd6cf5c16d0a0bb93b318f9d542c4aeefec

Contents?: true

Size: 636 Bytes

Versions: 30

Compression:

Stored size: 636 Bytes

Contents

module PuppetSpec::Pops
  extend RSpec::Matchers::DSL

  # Checks if an Acceptor has a specific issue in its list of diagnostics
  matcher :have_issue do |expected|
    match do |actual|
      actual.diagnostics.index { |i| i.issue == expected } != nil
    end
    failure_message do |actual|
      "expected Acceptor[#{actual.diagnostics.collect { |i| i.issue.issue_code }.join(',')}] to contain issue #{expected.issue_code}"
    end
    failure_message_when_negated do |actual|
      "expected Acceptor[#{actual.diagnostics.collect { |i| i.issue.issue_code }.join(',')}] to not contain issue #{expected.issue_code}"
    end
  end
end

Version data entries

30 entries across 30 versions & 1 rubygems

Version Path
puppet-4.3.2 spec/lib/puppet_spec/pops.rb
puppet-4.3.2-x86-mingw32 spec/lib/puppet_spec/pops.rb
puppet-4.3.2-x64-mingw32 spec/lib/puppet_spec/pops.rb
puppet-4.3.1 spec/lib/puppet_spec/pops.rb
puppet-4.3.1-x86-mingw32 spec/lib/puppet_spec/pops.rb
puppet-4.3.1-x64-mingw32 spec/lib/puppet_spec/pops.rb
puppet-4.3.0 spec/lib/puppet_spec/pops.rb
puppet-4.3.0-x86-mingw32 spec/lib/puppet_spec/pops.rb
puppet-4.3.0-x64-mingw32 spec/lib/puppet_spec/pops.rb
puppet-4.2.3 spec/lib/puppet_spec/pops.rb
puppet-4.2.3-x86-mingw32 spec/lib/puppet_spec/pops.rb
puppet-4.2.3-x64-mingw32 spec/lib/puppet_spec/pops.rb
puppet-4.2.2 spec/lib/puppet_spec/pops.rb
puppet-4.2.2-x86-mingw32 spec/lib/puppet_spec/pops.rb
puppet-4.2.2-x64-mingw32 spec/lib/puppet_spec/pops.rb
puppet-4.2.1 spec/lib/puppet_spec/pops.rb
puppet-4.2.1-x86-mingw32 spec/lib/puppet_spec/pops.rb
puppet-4.2.1-x64-mingw32 spec/lib/puppet_spec/pops.rb
puppet-4.2.0 spec/lib/puppet_spec/pops.rb
puppet-4.2.0-x86-mingw32 spec/lib/puppet_spec/pops.rb