I think checking for the detailed error message here would be better. Error messages we provide should be as specific as possible so that people can debug their things. 

```ruby
Ohai::Log.should_receive(:warn).with(/collect_data already defined on platform/)
```