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-0.10.1 lib/serverspec/matchers/be_enabled.rb
serverspec-0.10.0 lib/serverspec/matchers/be_enabled.rb
serverspec-0.9.8 lib/serverspec/matchers/be_enabled.rb
serverspec-0.9.7 lib/serverspec/matchers/be_enabled.rb
serverspec-0.9.6 lib/serverspec/matchers/be_enabled.rb
serverspec-0.9.5 lib/serverspec/matchers/be_enabled.rb
serverspec-0.9.4 lib/serverspec/matchers/be_enabled.rb
serverspec-0.9.3 lib/serverspec/matchers/be_enabled.rb
serverspec-0.9.2 lib/serverspec/matchers/be_enabled.rb
serverspec-0.9.1 lib/serverspec/matchers/be_enabled.rb
serverspec-0.9.0 lib/serverspec/matchers/be_enabled.rb
serverspec-0.8.1 lib/serverspec/matchers/be_enabled.rb
serverspec-0.8.0 lib/serverspec/matchers/be_enabled.rb
serverspec-0.7.13 lib/serverspec/matchers/be_enabled.rb
serverspec-0.7.12 lib/serverspec/matchers/be_enabled.rb
serverspec-0.7.11 lib/serverspec/matchers/be_enabled.rb
serverspec-0.7.10 lib/serverspec/matchers/be_enabled.rb
serverspec-0.7.9 lib/serverspec/matchers/be_enabled.rb
serverspec-0.7.8 lib/serverspec/matchers/be_enabled.rb
serverspec-0.7.7 lib/serverspec/matchers/be_enabled.rb