codingteam / horta-hell

Configurable XMPP bot written in Scala based on the Akka framework.
MIT License
15 stars 8 forks source link

Mocked Configuration support #403

Open ForNeVeR opened 8 years ago

ForNeVeR commented 8 years ago

Currently Configuration is a global object, and it's very hard to mock it for specific test. We need to, eh, fix that situation. One example of trouble I want to solve is https://github.com/codingteam/horta-hell/pull/402#issuecomment-230083701. We couldn't test the configuration properly because it's global and concurrent tests are redefining it all the way.

I'd like to be able to pass Configuration object explicitly to every plugin instance somehow.

After that, extract the pet-specific configuration from the general TestKitSpec.