opscode/ohai — pull request #263 by mcquin (2014-01-07 21:24:06+00:00)
Title: make linux/network.rb define collect_data(:linux)

`linux/network.rb` defined a default collect_data block, and there was no stub in `linux/network_spec.rb` defining the platform (e.g., `.stub(:collect_data).and_return(:linux)`). The tests were stubbed out enough that this wasn't caught.

I'm thinking of adding something to one of the spec helpers, like `when_on_platform(:x)`, which ensures that `collect_data(:x)` is chosen for that plugin and the code under `:x` is executed (or at the very least performs the `:collect_os` stub). Also, maybe we should treat errors raised by `Ohai::Loader` as failures during testing... Thoughts?

@danielsdeleo @sersut