Sha256: 621e2fdadf626eb10f594f6087e17b66994aa53b0ddb0b58fd1186e81a75f003

Contents?: true

Size: 330 Bytes

Versions: 1

Compression:

Stored size: 330 Bytes

Contents

RSpec::Matchers.define :be_installed_by_gem do
  match do |name|
    ret = do_check(commands.check_installed_by_gem(name))
    res = ret[:exit_code] == 0
    if res && @version
      res = false if not ret[:stdout].match(/\(#{@version}\)/)
    end
    res
  end
  chain :with_version do |version|
    @version = version
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
serverspec-0.1.7 lib/serverspec/matchers/be_installed_by_gem.rb