Sha256: 389503f7fae76a563b0f2e201c9765cf8b444e5722e23caff516bf98b98a4163

Contents?: true

Size: 259 Bytes

Versions: 134

Compression:

Stored size: 259 Bytes

Contents

RSpec::Matchers.define :be_enabled do
  match do |subject|
    if subject.class.name == 'Serverspec::Type::Service'
      subject.enabled?(@level || 3)
    else
      subject.enabled?
    end
  end

  chain :with_level do |level|
    @level = level
  end
end

Version data entries

134 entries across 134 versions & 2 rubygems

Version Path
serverspec-2.10.0 lib/serverspec/matcher/be_enabled.rb
serverspec-2.9.1 lib/serverspec/matcher/be_enabled.rb
serverspec-2.9.0 lib/serverspec/matcher/be_enabled.rb
serverspec-2.8.2 lib/serverspec/matcher/be_enabled.rb
serverspec-2.8.1 lib/serverspec/matcher/be_enabled.rb
serverspec-2.8.0 lib/serverspec/matcher/be_enabled.rb
serverspec-2.7.2 lib/serverspec/matcher/be_enabled.rb
serverspec-2.7.1 lib/serverspec/matcher/be_enabled.rb
serverspec-2.7.0 lib/serverspec/matcher/be_enabled.rb
serverspec-2.6.0 lib/serverspec/matcher/be_enabled.rb
serverspec-2.5.0 lib/serverspec/matcher/be_enabled.rb
serverspec-2.4.0 lib/serverspec/matcher/be_enabled.rb
serverspec-2.3.1 lib/serverspec/matcher/be_enabled.rb
serverspec-2.3.0 lib/serverspec/matcher/be_enabled.rb
serverspec-2.2.0 lib/serverspec/matcher/be_enabled.rb
serverspec-clc-2.1.0 lib/serverspec/matcher/be_enabled.rb
serverspec-2.1.0 lib/serverspec/matcher/be_enabled.rb
serverspec-2.0.1 lib/serverspec/matcher/be_enabled.rb
serverspec-2.0.0 lib/serverspec/matcher/be_enabled.rb
serverspec-2.0.0.beta21 lib/serverspec/matcher/be_enabled.rb