{"action":"created","issue":{"url":"https://api.github.com/repos/stephanenicolas/toothpick/issues/188","repository_url":"https://api.github.com/repos/stephanenicolas/toothpick","labels_url":"https://api.github.com/repos/stephanenicolas/toothpick/issues/188/labels{/name}","comments_url":"https://api.github.com/repos/stephanenicolas/toothpick/issues/188/comments","events_url":"https://api.github.com/repos/stephanenicolas/toothpick/issues/188/events","html_url":"https://github.com/stephanenicolas/toothpick/issues/188","id":200184315,"number":188,"title":"Android application scope getting reset after test","user":{"login":"efung","id":301094,"avatar_url":"https://avatars2.githubusercontent.com/u/301094?v=4","gravatar_id":"","url":"https://api.github.com/users/efung","html_url":"https://github.com/efung","followers_url":"https://api.github.com/users/efung/followers","following_url":"https://api.github.com/users/efung/following{/other_user}","gists_url":"https://api.github.com/users/efung/gists{/gist_id}","starred_url":"https://api.github.com/users/efung/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/efung/subscriptions","organizations_url":"https://api.github.com/users/efung/orgs","repos_url":"https://api.github.com/users/efung/repos","events_url":"https://api.github.com/users/efung/events{/privacy}","received_events_url":"https://api.github.com/users/efung/received_events","type":"User","site_admin":false},"labels":[{"id":348415877,"url":"https://api.github.com/repos/stephanenicolas/toothpick/labels/question","name":"question","color":"cc317c","default":true}],"state":"closed","locked":false,"assignee":{"login":"dlemures","id":5851365,"avatar_url":"https://avatars0.githubusercontent.com/u/5851365?v=4","gravatar_id":"","url":"https://api.github.com/users/dlemures","html_url":"https://github.com/dlemures","followers_url":"https://api.github.com/users/dlemures/followers","following_url":"https://api.github.com/users/dlemures/following{/other_user}","gists_url":"https://api.github.com/users/dlemures/gists{/gist_id}","starred_url":"https://api.github.com/users/dlemures/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dlemures/subscriptions","organizations_url":"https://api.github.com/users/dlemures/orgs","repos_url":"https://api.github.com/users/dlemures/repos","events_url":"https://api.github.com/users/dlemures/events{/privacy}","received_events_url":"https://api.github.com/users/dlemures/received_events","type":"User","site_admin":false},"assignees":[{"login":"dlemures","id":5851365,"avatar_url":"https://avatars0.githubusercontent.com/u/5851365?v=4","gravatar_id":"","url":"https://api.github.com/users/dlemures","html_url":"https://github.com/dlemures","followers_url":"https://api.github.com/users/dlemures/followers","following_url":"https://api.github.com/users/dlemures/following{/other_user}","gists_url":"https://api.github.com/users/dlemures/gists{/gist_id}","starred_url":"https://api.github.com/users/dlemures/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dlemures/subscriptions","organizations_url":"https://api.github.com/users/dlemures/orgs","repos_url":"https://api.github.com/users/dlemures/repos","events_url":"https://api.github.com/users/dlemures/events{/privacy}","received_events_url":"https://api.github.com/users/dlemures/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/stephanenicolas/toothpick/milestones/21","html_url":"https://github.com/stephanenicolas/toothpick/milestone/21","labels_url":"https://api.github.com/repos/stephanenicolas/toothpick/milestones/21/labels","id":2716675,"number":21,"title":"1.1.0","description":"","creator":{"login":"stephanenicolas","id":1832925,"avatar_url":"https://avatars3.githubusercontent.com/u/1832925?v=4","gravatar_id":"","url":"https://api.github.com/users/stephanenicolas","html_url":"https://github.com/stephanenicolas","followers_url":"https://api.github.com/users/stephanenicolas/followers","following_url":"https://api.github.com/users/stephanenicolas/following{/other_user}","gists_url":"https://api.github.com/users/stephanenicolas/gists{/gist_id}","starred_url":"https://api.github.com/users/stephanenicolas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stephanenicolas/subscriptions","organizations_url":"https://api.github.com/users/stephanenicolas/orgs","repos_url":"https://api.github.com/users/stephanenicolas/repos","events_url":"https://api.github.com/users/stephanenicolas/events{/privacy}","received_events_url":"https://api.github.com/users/stephanenicolas/received_events","type":"User","site_admin":false},"open_issues":0,"closed_issues":12,"state":"open","created_at":"2017-08-22T18:38:31Z","updated_at":"2017-10-14T00:08:31Z","due_on":null,"closed_at":null},"comments":10,"created_at":"2017-01-11T19:25:41Z","updated_at":"2017-10-14T00:08:31Z","closed_at":"2017-10-14T00:08:31Z","author_association":"NONE","body":"Suppose I create a global application scope from my Android `Application` class, e.g.\r\n\r\n```\r\n    @Override\r\n    public void onCreate() {\r\n        super.onCreate();\r\n\r\n        Scope appScope = Toothpick.openScopes(APP_SCOPE);\r\n        appScope.installModules(\r\n                new SmoothieApplicationModule(this),\r\n                new MyAppModule(this));\r\n        );\r\n    }\r\n```\r\n\r\nSuppose this global scope is used everywhere in my app.\r\n\r\nIn my instrumentation tests, I want to mock out some of the instances provided by `MyAppModule`. If I use `ToothPickRule` in my tests, so that I get the auto-binding of `@Mock`s from `ToothPickTestModule`, the entire Toothpick scope gets reset after each test. Since the `Application.onCreate()` is only called once, I lose any modules I installed in that scope.\r\n\r\nWhat would be the recommended approach here?"},"comment":{"url":"https://api.github.com/repos/stephanenicolas/toothpick/issues/comments/336594144","html_url":"https://github.com/stephanenicolas/toothpick/issues/188#issuecomment-336594144","issue_url":"https://api.github.com/repos/stephanenicolas/toothpick/issues/188","id":336594144,"user":{"login":"stephanenicolas","id":1832925,"avatar_url":"https://avatars3.githubusercontent.com/u/1832925?v=4","gravatar_id":"","url":"https://api.github.com/users/stephanenicolas","html_url":"https://github.com/stephanenicolas","followers_url":"https://api.github.com/users/stephanenicolas/followers","following_url":"https://api.github.com/users/stephanenicolas/following{/other_user}","gists_url":"https://api.github.com/users/stephanenicolas/gists{/gist_id}","starred_url":"https://api.github.com/users/stephanenicolas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stephanenicolas/subscriptions","organizations_url":"https://api.github.com/users/stephanenicolas/orgs","repos_url":"https://api.github.com/users/stephanenicolas/repos","events_url":"https://api.github.com/users/stephanenicolas/events{/privacy}","received_events_url":"https://api.github.com/users/stephanenicolas/received_events","type":"User","site_admin":false},"created_at":"2017-10-14T00:08:31Z","updated_at":"2017-10-14T00:08:31Z","author_association":"OWNER","body":"I close this topic as it was addressed in 1.1.x"}}
{"actor":{"display_login":"stephanenicolas"}}