{"action":"created","issue":{"url":"https://api.github.com/repos/joeyespo/grip/issues/57","labels_url":"https://api.github.com/repos/joeyespo/grip/issues/57/labels{/name}","comments_url":"https://api.github.com/repos/joeyespo/grip/issues/57/comments","events_url":"https://api.github.com/repos/joeyespo/grip/issues/57/events","html_url":"https://github.com/joeyespo/grip/pull/57","id":32780879,"number":57,"title":"Started exporting some logic to make testing easier, and began testing","user":{"login":"mjgpy3","id":1709849,"avatar_url":"https://avatars.githubusercontent.com/u/1709849?v=3","gravatar_id":"","url":"https://api.github.com/users/mjgpy3","html_url":"https://github.com/mjgpy3","followers_url":"https://api.github.com/users/mjgpy3/followers","following_url":"https://api.github.com/users/mjgpy3/following{/other_user}","gists_url":"https://api.github.com/users/mjgpy3/gists{/gist_id}","starred_url":"https://api.github.com/users/mjgpy3/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mjgpy3/subscriptions","organizations_url":"https://api.github.com/users/mjgpy3/orgs","repos_url":"https://api.github.com/users/mjgpy3/repos","events_url":"https://api.github.com/users/mjgpy3/events{/privacy}","received_events_url":"https://api.github.com/users/mjgpy3/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/joeyespo/grip/labels/tests","name":"tests","color":"009800"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2014-05-05T00:01:48Z","updated_at":"2015-02-07T04:54:55Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/joeyespo/grip/pulls/57","html_url":"https://github.com/joeyespo/grip/pull/57","diff_url":"https://github.com/joeyespo/grip/pull/57.diff","patch_url":"https://github.com/joeyespo/grip/pull/57.patch"},"body":"Per https://github.com/joeyespo/grip/issues/55:\r\n\r\nHi all. I exported some factory-esque logic into actual factories and wrote tests for them. The hope is that, because of these factories:\r\n 1. Future change will be easier, since they are pretty simple and are decently tested\r\n 2. Future testing is bootstrapped (starting is the hard part, right?)\r\n 3. Factorizing logic may (later) reduce the amount of parameter coupling\r\n\r\nPlease let me know what you think. If any re-work seems necessary, let me know, or if you have any questions about the changes feel free to ask :)\r\n\r\nCheers,\r\nGilli"},"comment":{"url":"https://api.github.com/repos/joeyespo/grip/issues/comments/73350107","html_url":"https://github.com/joeyespo/grip/pull/57#issuecomment-73350107","issue_url":"https://api.github.com/repos/joeyespo/grip/issues/57","id":73350107,"user":{"login":"joeyespo","id":634573,"avatar_url":"https://avatars.githubusercontent.com/u/634573?v=3","gravatar_id":"","url":"https://api.github.com/users/joeyespo","html_url":"https://github.com/joeyespo","followers_url":"https://api.github.com/users/joeyespo/followers","following_url":"https://api.github.com/users/joeyespo/following{/other_user}","gists_url":"https://api.github.com/users/joeyespo/gists{/gist_id}","starred_url":"https://api.github.com/users/joeyespo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joeyespo/subscriptions","organizations_url":"https://api.github.com/users/joeyespo/orgs","repos_url":"https://api.github.com/users/joeyespo/repos","events_url":"https://api.github.com/users/joeyespo/events{/privacy}","received_events_url":"https://api.github.com/users/joeyespo/received_events","type":"User","site_admin":false},"created_at":"2015-02-07T04:54:55Z","updated_at":"2015-02-07T04:54:55Z","body":"Hi, @mjgpy3. Thank you for getting this going! While testing is surely lacking, I don't think the factory pattern is the way to go here. It's purpose is more for creating objects without specifying the exact class, which gets around limitations of languages without first-class constructors.\r\n\r\nI started writing some very basic tests that I'll push up soon. In the beginning, they'll be far-reaching, but the hope is that they'll safely break the code into smaller, more testable functions over time. The smaller functions will be public, so they'll still have to make sense for the API (albeit lower-level). Any help testing existing functions or breaking down already-tested functions is hugely appreciated.\r\n\r\nBest,\r\nJoe\r\n"}}