test/shared/spec_helper.rb
# Checks if package is installed on a given list (instance)
#
# @param name [String] regex for package name
# @param version [String] regex for package version
# @param list [String] a list of packages
# @return [Boolean] true if package is installed, false otherwise
Checks if package is installed on a given list (instance)
Checks if package is installed on a given list ( instance )
def package_installed(name, version, list)
    begin
      dt = list.scan(/^#{name}.*#{version}.*/).first.split('|')[9]
      DateTime.parse(dt)
    rescue
      return false
    end
    true
  end
def package_installed ( name , version , list ) begin dt = list . scan ( / ^ #{ name } .* #{ version } .* / ) . first . split ( '|' ) [ 9 ] DateTime . parse ( dt ) rescue return false end true end
Checks if package is installed on a given list (instance)
Checks if package is installed on a given list ( instance )
true if package is installed, false otherwise
true if package is installed false otherwise
Boolean
name
regex for package name
regex for package name
version
regex for package version
regex for package version
list
a list of packages
a list of packages