Make it easier to write unit test on a plugin

See test/weather_test.rb for an example