Sha256: bc29dbdbe027e2a7b054c8968efc80c84f73757a748e35438a470fba8d2ae2ca

Contents?: true

Size: 255 Bytes

Versions: 9

Compression:

Stored size: 255 Bytes

Contents

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

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

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
serverspec-0.6.23 lib/serverspec/matchers/be_enabled.rb
serverspec-0.6.22 lib/serverspec/matchers/be_enabled.rb
serverspec-0.6.21 lib/serverspec/matchers/be_enabled.rb
serverspec-0.6.20 lib/serverspec/matchers/be_enabled.rb
serverspec-0.6.19 lib/serverspec/matchers/be_enabled.rb
serverspec-0.6.18 lib/serverspec/matchers/be_enabled.rb
serverspec-0.6.17 lib/serverspec/matchers/be_enabled.rb
serverspec-0.6.16 lib/serverspec/matchers/be_enabled.rb
serverspec-0.6.15 lib/serverspec/matchers/be_enabled.rb