Sha256: ca9fe5a7a2ecde6f8af9839986c875f8100b65b51bbff03dcf7ea62fc1d122d4

Contents?: true

Size: 1.53 KB

Versions: 10

Compression:

Stored size: 1.53 KB

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

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

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

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

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

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
serverspec-0.5.8 spec/support/shared_package_examples.rb
serverspec-0.5.7 spec/support/shared_package_examples.rb
serverspec-0.5.6 spec/support/shared_package_examples.rb
serverspec-0.5.5 spec/support/shared_package_examples.rb
serverspec-0.5.4 spec/support/shared_package_examples.rb
serverspec-0.5.3 spec/support/shared_package_examples.rb
serverspec-0.5.2 spec/support/shared_package_examples.rb
serverspec-0.5.1 spec/support/shared_package_examples.rb
serverspec-0.5.0 spec/support/shared_package_examples.rb
serverspec-0.4.14 spec/support/shared_package_examples.rb