test/shared/spec_helper.rb
# Checks if package is uploaded 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 uploaded, false otherwise
Checks if package is uploaded on a given list (instance)
Checks if package is uploaded on a given list ( instance )
def package_exists(name, version, list)
    status = list.scan(/^#{name}.*#{version}.*/).first
    status.nil? ? false : true
  end
def package_exists ( name , version , list ) status = list . scan ( / ^ #{ name } .* #{ version } .* / ) . first status . nil? ? false : true end
Checks if package is uploaded on a given list (instance)
Checks if package is uploaded on a given list ( instance )
true if package is uploaded, false otherwise
true if package is uploaded 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