Sha256: 42d7d463704202d56b47c683a14f24c30f463e95d0d521444cfa908bf91881c4

Contents?: true

Size: 913 Bytes

Versions: 5

Compression:

Stored size: 913 Bytes

Contents

shared_examples_for 'support package installed matcher' do |name|
  describe 'be_installed' do
    describe package(name) do
      it { should be_installed }
    end

    describe 'invalid-package' do
      it { should_not be_installed }
    end
  end
end

shared_examples_for 'support package installed by gem matcher' do |name|
  describe 'installed by gem' do
    describe package(name) do
      it { should be_installed.by('gem') }
    end

    describe 'invalid-gem' do
      it { should_not be_installed.by('gem') }
    end
  end
end

shared_examples_for 'support package installed by gem with version matcher' do |name, version|
  describe 'installed by gem with version' do
    describe package(name) do
      it { should be_installed.by('gem').with_version(version) }
    end

    describe package(name) do
      it { should_not be_installed.by('gem').with_version('invalid-version') }
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
serverspec-0.4.13 spec/support/shared_package_examples.rb
serverspec-0.4.12 spec/support/shared_package_examples.rb
serverspec-0.4.11 spec/support/shared_package_examples.rb
serverspec-0.4.10 spec/support/shared_package_examples.rb
serverspec-0.4.9 spec/support/shared_package_examples.rb