Dependency Injection: Vital or Irrelevant?

Ruby Version

class PotSensor
  def coffee_present?
    ...
  end
end

class Heater
  def on() ... end
  def off() ... end
end

Again, the "…" represents code that is strongly dependent on the hardware.