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-1.16.0 lib/serverspec/matchers/be_enabled.rb
serverspec-1.15.0 lib/serverspec/matchers/be_enabled.rb
serverspec-2.0.0.beta20 lib/serverspec/matcher/be_enabled.rb
serverspec-2.0.0.beta19 lib/serverspec/matcher/be_enabled.rb
serverspec-2.0.0.beta18 lib/serverspec/matcher/be_enabled.rb
serverspec-2.0.0.beta17 lib/serverspec/matcher/be_enabled.rb
serverspec-1.14.0 lib/serverspec/matchers/be_enabled.rb
serverspec-1.13.0 lib/serverspec/matchers/be_enabled.rb
serverspec-1.12.0 lib/serverspec/matchers/be_enabled.rb
serverspec-2.0.0.beta16 lib/serverspec/matchers/be_enabled.rb
serverspec-2.0.0.beta15 lib/serverspec/matchers/be_enabled.rb
serverspec-2.0.0.beta14 lib/serverspec/matchers/be_enabled.rb
serverspec-2.0.0.beta13 lib/serverspec/matchers/be_enabled.rb
serverspec-2.0.0.beta12 lib/serverspec/matchers/be_enabled.rb
serverspec-2.0.0.beta11 lib/serverspec/matchers/be_enabled.rb
serverspec-1.11.0 lib/serverspec/matchers/be_enabled.rb
serverspec-2.0.0.beta10 lib/serverspec/matchers/be_enabled.rb
serverspec-2.0.0.beta9 lib/serverspec/matchers/be_enabled.rb
serverspec-1.10.0 lib/serverspec/matchers/be_enabled.rb
serverspec-2.0.0.beta8 lib/serverspec/matchers/be_enabled.rb