Sha256: 5bf3ba52db802aca2c35c657e55e113fb57e26f6865717798d21511bf1dac8ce

Contents?: true

Size: 510 Bytes

Versions: 3

Compression:

Stored size: 510 Bytes

Contents

RSpec::Matchers.define :have_running_service do |service|
  match do |vm|
    @result = vm.execute("status #{service}").stdout
    @result =~ /start\/running/
  end

  failure_message_for_should do |vm|
    "expected that #{vm.name} should have running service '#{service}' but was '#{@result}'"
  end

  failure_message_for_should_not do |vm|
    "expected that #{vm.name} should not have running service '#{service}' but was '#{@result}'"
  end

  description do
    "running service '#{service}'"
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
foodtaster-0.0.10 lib/foodtaster/rspec/matchers/service_matcher.rb
foodtaster-0.0.9 lib/foodtaster/rspec/matchers/service_matcher.rb
foodtaster-0.0.8 lib/foodtaster/rspec/matchers/service_matcher.rb