Sha256: 29bfcd324dbb3a574af101f41b293b5d3472e71df6d184c4401de0cbe4d4de0d

Contents?: true

Size: 378 Bytes

Versions: 14

Compression:

Stored size: 378 Bytes

Contents

# This verifies that the given subprocess command exits with the right code.
RSpec::Matchers.define :exit_with do |code|
  match do |actual|
    actual.exit_code == code
  end

  failure_message do |actual|
    "expected command to exit with #{code} but got exit code: #{actual.exit_code}\n\n" +
      "stdout: #{actual.stdout}\n\n" +
      "stderr: #{actual.stderr}"
  end
end

Version data entries

14 entries across 5 versions & 1 rubygems

Version Path
vagrant-unbundled-2.2.19.0 vendor/bundle/ruby/2.7.0/bundler/gems/vagrant-spec-93c587f3c98a/lib/vagrant-spec/acceptance/rspec/matcher_exit_with.rb
vagrant-unbundled-2.2.19.0 vendor/bundle/ruby/3.0.0/bundler/gems/vagrant-spec-b6b56c8b8135/lib/vagrant-spec/acceptance/rspec/matcher_exit_with.rb
vagrant-unbundled-2.2.19.0 vendor/bundle/ruby/3.0.0/bundler/gems/vagrant-spec-03d88fe24677/lib/vagrant-spec/acceptance/rspec/matcher_exit_with.rb
vagrant-unbundled-2.2.19.0 vendor/bundle/ruby/2.7.0/bundler/gems/vagrant-spec-b6b56c8b8135/lib/vagrant-spec/acceptance/rspec/matcher_exit_with.rb
vagrant-unbundled-2.2.18.0 vendor/bundle/ruby/2.7.0/bundler/gems/vagrant-spec-b6b56c8b8135/lib/vagrant-spec/acceptance/rspec/matcher_exit_with.rb
vagrant-unbundled-2.2.18.0 vendor/bundle/ruby/2.7.0/bundler/gems/vagrant-spec-93c587f3c98a/lib/vagrant-spec/acceptance/rspec/matcher_exit_with.rb
vagrant-unbundled-2.2.18.0 vendor/bundle/ruby/3.0.0/bundler/gems/vagrant-spec-03d88fe24677/lib/vagrant-spec/acceptance/rspec/matcher_exit_with.rb
vagrant-unbundled-2.2.18.0 vendor/bundle/ruby/3.0.0/bundler/gems/vagrant-spec-b6b56c8b8135/lib/vagrant-spec/acceptance/rspec/matcher_exit_with.rb
vagrant-unbundled-2.2.16.0 vendor/bundle/ruby/2.7.0/bundler/gems/vagrant-spec-b6b56c8b8135/lib/vagrant-spec/acceptance/rspec/matcher_exit_with.rb
vagrant-unbundled-2.2.16.0 vendor/bundle/ruby/3.0.0/bundler/gems/vagrant-spec-b6b56c8b8135/lib/vagrant-spec/acceptance/rspec/matcher_exit_with.rb
vagrant-unbundled-2.2.16.0 vendor/bundle/ruby/2.7.0/bundler/gems/vagrant-spec-93c587f3c98a/lib/vagrant-spec/acceptance/rspec/matcher_exit_with.rb
vagrant-unbundled-2.2.14.0 vendor/bundle/ruby/2.7.0/bundler/gems/vagrant-spec-b6b56c8b8135/lib/vagrant-spec/acceptance/rspec/matcher_exit_with.rb
vagrant-unbundled-2.2.14.0 vendor/bundle/ruby/2.7.0/bundler/gems/vagrant-spec-93c587f3c98a/lib/vagrant-spec/acceptance/rspec/matcher_exit_with.rb
vagrant-unbundled-2.2.10.0 vendor/bundle/ruby/2.7.0/bundler/gems/vagrant-spec-93c587f3c98a/lib/vagrant-spec/acceptance/rspec/matcher_exit_with.rb