Redirecting stderr and using grep inline means that this is really hard to test. It would probably be better to do this logic inside of the method, with something like this:

```ruby
def self.virt_what(command = "virt-what")
  redirected_cmd = "#{command} 2>/dev/null"
  output = Facter::Util::Resolution.exec redirected_cmd
  output.gsub /^virt-what: .*$/
end
```

Right now the tests are failing and there isn't a really good way to change them; this modification should make the code more testable.