Sha256: 6b47cce7e5beb46fe7850371ff5dc189bc5608b4b696a1561de02397dbf36f2c

Contents?: true

Size: 519 Bytes

Versions: 21

Compression:

Stored size: 519 Bytes

Contents

RSpec::Matchers.define :be_installed do
  match do |name|
    if subject.class.name == 'Serverspec::Type::SelinuxModule'
      name.installed?(@version)
    else
      name.installed?(@provider, @version)
    end
  end

  description do
    message = 'be installed'
    message << %( by "#{@provider}") if @provider
    message << %( with version "#{@version}") if @version
    message
  end

  chain :by do |provider|
    @provider = provider
  end

  chain :with_version do |version|
    @version = version
  end
end

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
serverspec-2.30.1 lib/serverspec/matcher/be_installed.rb