ded/bowser — pull request #32 by Xiphe (2013-12-13 13:48:40+00:00)
Title: Make testable and add tests.

Hey,

Thanks again for your feedback on my last [pull request #24](https://github.com/ded/bowser/pull/24).
I've now split my PR into two parts and kept your coding style.
This is the first part and it's manly adding tests for the existing functionality.

The internal changes where required to make everything testable (We have to re-execute `detect()` with different user agent strings multiple times.) and make the tests succeed.