Sha256: 42f4b3b0543220fece579b236c5cb511e1e0c0a3a3ba71c0fd24ce9b5af0a1ae

Contents?: true

Size: 374 Bytes

Versions: 33

Compression:

Stored size: 374 Bytes

Contents

RSpec::Matchers.define :be_monitored_by do |monitor|
  match do |service|
    service.monitored_by?(monitor, @monitor_name)
  end
  description do 
    if @monitor_name
      "be monitored by #{monitor} with name #{@monitor_name}"
    else 
      "be monitored by #{monitor}" 
    end 
  end 

  chain :with_name do |name|
    @monitor_name = (name ? name : nil)
  end

end

Version data entries

33 entries across 33 versions & 2 rubygems

Version Path
serverspec-2.42.3 lib/serverspec/matcher/be_monitored_by.rb
serverspec-2.42.2 lib/serverspec/matcher/be_monitored_by.rb
serverspec-2.42.1 lib/serverspec/matcher/be_monitored_by.rb
serverspec-cem-acpt-2.42.0 lib/serverspec/matcher/be_monitored_by.rb
serverspec-2.42.0 lib/serverspec/matcher/be_monitored_by.rb
serverspec-2.41.8 lib/serverspec/matcher/be_monitored_by.rb
serverspec-2.41.7 lib/serverspec/matcher/be_monitored_by.rb
serverspec-2.41.6 lib/serverspec/matcher/be_monitored_by.rb
serverspec-2.41.5 lib/serverspec/matcher/be_monitored_by.rb
serverspec-2.41.4 lib/serverspec/matcher/be_monitored_by.rb
serverspec-2.41.3 lib/serverspec/matcher/be_monitored_by.rb
serverspec-2.41.2 lib/serverspec/matcher/be_monitored_by.rb
serverspec-2.41.1 lib/serverspec/matcher/be_monitored_by.rb
serverspec-2.41.0 lib/serverspec/matcher/be_monitored_by.rb
serverspec-2.40.0 lib/serverspec/matcher/be_monitored_by.rb
serverspec-2.39.2 lib/serverspec/matcher/be_monitored_by.rb
serverspec-2.39.1 lib/serverspec/matcher/be_monitored_by.rb
serverspec-2.39.0 lib/serverspec/matcher/be_monitored_by.rb
serverspec-2.38.1 lib/serverspec/matcher/be_monitored_by.rb
serverspec-2.38.0 lib/serverspec/matcher/be_monitored_by.rb