Sha256: e1d3c23e4c1b96a151ade89bc97b02b478bec1ab15f11394fe1cc82142e0822a

Contents?: true

Size: 274 Bytes

Versions: 22

Compression:

Stored size: 274 Bytes

Contents

RSpec::Matchers.define :return_exit_status do |status|
  match do |command|
    if command.respond_to?(:return_exit_status?)
      command.return_exit_status?(status)
    else
      ret = backend.run_command(command)
      ret[:exit_status].to_i == status
    end
  end
end

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
serverspec-0.5.8 lib/serverspec/matchers/return_exit_status.rb
serverspec-0.5.7 lib/serverspec/matchers/return_exit_status.rb
serverspec-0.5.6 lib/serverspec/matchers/return_exit_status.rb
serverspec-0.5.5 lib/serverspec/matchers/return_exit_status.rb
serverspec-0.5.4 lib/serverspec/matchers/return_exit_status.rb
serverspec-0.5.3 lib/serverspec/matchers/return_exit_status.rb
serverspec-0.5.2 lib/serverspec/matchers/return_exit_status.rb
serverspec-0.5.1 lib/serverspec/matchers/return_exit_status.rb
serverspec-0.5.0 lib/serverspec/matchers/return_exit_status.rb
serverspec-0.4.14 lib/serverspec/matchers/return_exit_status.rb
serverspec-0.4.13 lib/serverspec/matchers/return_exit_status.rb
serverspec-0.4.12 lib/serverspec/matchers/return_exit_status.rb
serverspec-0.4.11 lib/serverspec/matchers/return_exit_status.rb
serverspec-0.4.10 lib/serverspec/matchers/return_exit_status.rb
serverspec-0.4.9 lib/serverspec/matchers/return_exit_status.rb
serverspec-0.4.8 lib/serverspec/matchers/return_exit_status.rb
serverspec-0.4.7 lib/serverspec/matchers/return_exit_status.rb
serverspec-0.4.6 lib/serverspec/matchers/return_exit_status.rb
serverspec-0.4.5 lib/serverspec/matchers/return_exit_status.rb
serverspec-0.4.4 lib/serverspec/matchers/return_exit_status.rb