> it modifies the path for the whole program

Fair point. How about this, which hides the nasty detail from the specs, unlike all of the above.
```ruby
def with_sbin_path(&block)
  old_path = ENV["PATH"]
  ENV["PATH"] = "/sbin:/usr/sbin:" + ENV["PATH"] unless ENV["PATH"].include?("/sbin")
  block.call
  ENV["PATH"] = old_path
end
...
with_sbin_path do
  pci_out = `lspci -n -vmm`
end
```