atomicobject/objection — pull request #77 by jonah-carbonfive (2014-07-22 17:58:51+00:00)
Title: Expose an injector's modules

Related to https://github.com/atomicobject/objection/issues/76

I want to be able to write functional tests which use objection to create an object graph. Some objects in that graph are registered as singletons. In between tests I want to create a new injector with the same module configuration but without inheriting the same global context so that I reset the state of the injector for each test.

By exposing the modules of the current injector I can write a test observer:
```
- (void)testCaseDidStart:(XCTestRun *)testRun {
NSArray *modules = [[JSObjection defaultInjector] modules];
JSObjectionInjector *injector = [JSObjection createInjectorWithModulesArray:modules];
[JSObjection setDefaultInjector:injector];
[super testCaseDidStart:testRun];
}
```
Which can recreate injectors without needing to know how Objection modules are configured in the application under test.