{"action":"closed","number":212,"pull_request":{"url":"https://api.github.com/repos/Albacore/albacore/pulls/212","id":77390480,"html_url":"https://github.com/Albacore/albacore/pull/212","diff_url":"https://github.com/Albacore/albacore/pull/212.diff","patch_url":"https://github.com/Albacore/albacore/pull/212.patch","issue_url":"https://api.github.com/repos/Albacore/albacore/issues/212","number":212,"state":"closed","locked":false,"title":"Support batching tests","user":{"login":"blairconrad","id":3275797,"avatar_url":"https://avatars.githubusercontent.com/u/3275797?v=3","gravatar_id":"","url":"https://api.github.com/users/blairconrad","html_url":"https://github.com/blairconrad","followers_url":"https://api.github.com/users/blairconrad/followers","following_url":"https://api.github.com/users/blairconrad/following{/other_user}","gists_url":"https://api.github.com/users/blairconrad/gists{/gist_id}","starred_url":"https://api.github.com/users/blairconrad/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/blairconrad/subscriptions","organizations_url":"https://api.github.com/users/blairconrad/orgs","repos_url":"https://api.github.com/users/blairconrad/repos","events_url":"https://api.github.com/users/blairconrad/events{/privacy}","received_events_url":"https://api.github.com/users/blairconrad/received_events","type":"User","site_admin":false},"body":"Fixes #207.\r\n\r\n@haf,  I have to ask forgiveness. I have broken the cardinal rule of Pull Requests by substantially changing the base code, and its style. I fear it will not be to your taste, and apologize. But if you have patience to work with me, I'm happy to fix anything you don't like.\r\n\r\nAn explanation:\r\n\r\nIn order to test the test-batching, I found that I would need access to the `TestRunner::Cmd`  objects that the `TestRunner::Task` was making. Relying on creating a Cmd in the specs and investigating its behaviour would no longer work. So I made a change to the Task to support this. At the same time, it became clear that poking `execute_tests_for dll` wouldn't work either.\r\nSo I, in stages, replaced most of the specs so they would be driven from the `Task` level, and cover (nearly) all behaviour in the `Task` and `Cmd`s. It's counter to the existing approach, but is more refactoring-friendly, and is an approach that I've seen work very well in other projects. By driving the code in a way that more closely matches how the users would, you can worry a little less about the internal details.\r\n\r\nSo:\r\n\r\n1. I introduced a private `execute_commands` method on the Task, which is overridden in the specs. The original behaviour is so simple that not exercising it during the specs is hopefully forgivable. I'm not usually a fan of overriding production methods in tests, but it seems no worse than sending a signal to a private method.\r\n2. I updated existing specs to provide close to end-to-end coverage, from the config object down to the command, to mirror how the new specs would be written.\r\n3. I added minor extra specs, e.g. for `is_ms_test`. I did not add an end-to-end spec for `copy_local`, as I wasn't sure you'd want to add all that extra copying around during test runs\r\n4. The new specs change their working directory to better work with existing \"test\" files. The task requires test files to actually exist, so I co-opted existing files in the hierarchy. By running in the `specs` directory, it's possible to test a negative relative path exactly. I know, perhaps this was an odd choice.\r\n5. Finally introduced specs for the `execute_as_batch` option, and implemented the feature. There's no \"path shortening\" feature for this yet - the tests would execute in the current directory. If you'd like, I can see about looking for the lowest common directory above the \"test files\" and execute from there, or some such. Or this could be introduced later, if you think it worthwhile.\r\n\r\nSo, yeah. Perhaps not what you were expecting. And maybe totally against the style you'd like to have for the tests. And my lack of ruby/rspec knowledge probably means I've made a terrible mess of all of it. Sorry. But again, if you're willing, I'll work to mold things into a shape you prefer.\r\n\r\nThanks for considering the PR.","created_at":"2016-07-14T02:15:10Z","updated_at":"2016-07-14T02:15:38Z","closed_at":"2016-07-14T02:15:38Z","merged_at":null,"merge_commit_sha":"ce8f8704d06dfe565f0a35573fc832747202d94f","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/Albacore/albacore/pulls/212/commits","review_comments_url":"https://api.github.com/repos/Albacore/albacore/pulls/212/comments","review_comment_url":"https://api.github.com/repos/Albacore/albacore/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Albacore/albacore/issues/212/comments","statuses_url":"https://api.github.com/repos/Albacore/albacore/statuses/fab8026e094815061b7a6935e469fbed2af0c5b5","head":{"label":"blairconrad:relative-batch-paths","ref":"relative-batch-paths","sha":"fab8026e094815061b7a6935e469fbed2af0c5b5","user":{"login":"blairconrad","id":3275797,"avatar_url":"https://avatars.githubusercontent.com/u/3275797?v=3","gravatar_id":"","url":"https://api.github.com/users/blairconrad","html_url":"https://github.com/blairconrad","followers_url":"https://api.github.com/users/blairconrad/followers","following_url":"https://api.github.com/users/blairconrad/following{/other_user}","gists_url":"https://api.github.com/users/blairconrad/gists{/gist_id}","starred_url":"https://api.github.com/users/blairconrad/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/blairconrad/subscriptions","organizations_url":"https://api.github.com/users/blairconrad/orgs","repos_url":"https://api.github.com/users/blairconrad/repos","events_url":"https://api.github.com/users/blairconrad/events{/privacy}","received_events_url":"https://api.github.com/users/blairconrad/received_events","type":"User","site_admin":false},"repo":{"id":61410639,"name":"albacore","full_name":"blairconrad/albacore","owner":{"login":"blairconrad","id":3275797,"avatar_url":"https://avatars.githubusercontent.com/u/3275797?v=3","gravatar_id":"","url":"https://api.github.com/users/blairconrad","html_url":"https://github.com/blairconrad","followers_url":"https://api.github.com/users/blairconrad/followers","following_url":"https://api.github.com/users/blairconrad/following{/other_user}","gists_url":"https://api.github.com/users/blairconrad/gists{/gist_id}","starred_url":"https://api.github.com/users/blairconrad/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/blairconrad/subscriptions","organizations_url":"https://api.github.com/users/blairconrad/orgs","repos_url":"https://api.github.com/users/blairconrad/repos","events_url":"https://api.github.com/users/blairconrad/events{/privacy}","received_events_url":"https://api.github.com/users/blairconrad/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/blairconrad/albacore","description":"Albacore is a professional quality suite of Rake tasks for building .NET or Mono based systems.","fork":true,"url":"https://api.github.com/repos/blairconrad/albacore","forks_url":"https://api.github.com/repos/blairconrad/albacore/forks","keys_url":"https://api.github.com/repos/blairconrad/albacore/keys{/key_id}","collaborators_url":"https://api.github.com/repos/blairconrad/albacore/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/blairconrad/albacore/teams","hooks_url":"https://api.github.com/repos/blairconrad/albacore/hooks","issue_events_url":"https://api.github.com/repos/blairconrad/albacore/issues/events{/number}","events_url":"https://api.github.com/repos/blairconrad/albacore/events","assignees_url":"https://api.github.com/repos/blairconrad/albacore/assignees{/user}","branches_url":"https://api.github.com/repos/blairconrad/albacore/branches{/branch}","tags_url":"https://api.github.com/repos/blairconrad/albacore/tags","blobs_url":"https://api.github.com/repos/blairconrad/albacore/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/blairconrad/albacore/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/blairconrad/albacore/git/refs{/sha}","trees_url":"https://api.github.com/repos/blairconrad/albacore/git/trees{/sha}","statuses_url":"https://api.github.com/repos/blairconrad/albacore/statuses/{sha}","languages_url":"https://api.github.com/repos/blairconrad/albacore/languages","stargazers_url":"https://api.github.com/repos/blairconrad/albacore/stargazers","contributors_url":"https://api.github.com/repos/blairconrad/albacore/contributors","subscribers_url":"https://api.github.com/repos/blairconrad/albacore/subscribers","subscription_url":"https://api.github.com/repos/blairconrad/albacore/subscription","commits_url":"https://api.github.com/repos/blairconrad/albacore/commits{/sha}","git_commits_url":"https://api.github.com/repos/blairconrad/albacore/git/commits{/sha}","comments_url":"https://api.github.com/repos/blairconrad/albacore/comments{/number}","issue_comment_url":"https://api.github.com/repos/blairconrad/albacore/issues/comments{/number}","contents_url":"https://api.github.com/repos/blairconrad/albacore/contents/{+path}","compare_url":"https://api.github.com/repos/blairconrad/albacore/compare/{base}...{head}","merges_url":"https://api.github.com/repos/blairconrad/albacore/merges","archive_url":"https://api.github.com/repos/blairconrad/albacore/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/blairconrad/albacore/downloads","issues_url":"https://api.github.com/repos/blairconrad/albacore/issues{/number}","pulls_url":"https://api.github.com/repos/blairconrad/albacore/pulls{/number}","milestones_url":"https://api.github.com/repos/blairconrad/albacore/milestones{/number}","notifications_url":"https://api.github.com/repos/blairconrad/albacore/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/blairconrad/albacore/labels{/name}","releases_url":"https://api.github.com/repos/blairconrad/albacore/releases{/id}","deployments_url":"https://api.github.com/repos/blairconrad/albacore/deployments","created_at":"2016-06-18T01:03:02Z","updated_at":"2016-06-18T01:03:04Z","pushed_at":"2016-07-13T20:37:06Z","git_url":"git://github.com/blairconrad/albacore.git","ssh_url":"git@github.com:blairconrad/albacore.git","clone_url":"https://github.com/blairconrad/albacore.git","svn_url":"https://github.com/blairconrad/albacore","homepage":"www.albacorebuild.net","size":27331,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"Albacore:master","ref":"master","sha":"a1dae2d06e148617fc6c3803fcf98bc2953309a3","user":{"login":"Albacore","id":2181134,"avatar_url":"https://avatars.githubusercontent.com/u/2181134?v=3","gravatar_id":"","url":"https://api.github.com/users/Albacore","html_url":"https://github.com/Albacore","followers_url":"https://api.github.com/users/Albacore/followers","following_url":"https://api.github.com/users/Albacore/following{/other_user}","gists_url":"https://api.github.com/users/Albacore/gists{/gist_id}","starred_url":"https://api.github.com/users/Albacore/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Albacore/subscriptions","organizations_url":"https://api.github.com/users/Albacore/orgs","repos_url":"https://api.github.com/users/Albacore/repos","events_url":"https://api.github.com/users/Albacore/events{/privacy}","received_events_url":"https://api.github.com/users/Albacore/received_events","type":"Organization","site_admin":false},"repo":{"id":5526049,"name":"albacore","full_name":"Albacore/albacore","owner":{"login":"Albacore","id":2181134,"avatar_url":"https://avatars.githubusercontent.com/u/2181134?v=3","gravatar_id":"","url":"https://api.github.com/users/Albacore","html_url":"https://github.com/Albacore","followers_url":"https://api.github.com/users/Albacore/followers","following_url":"https://api.github.com/users/Albacore/following{/other_user}","gists_url":"https://api.github.com/users/Albacore/gists{/gist_id}","starred_url":"https://api.github.com/users/Albacore/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Albacore/subscriptions","organizations_url":"https://api.github.com/users/Albacore/orgs","repos_url":"https://api.github.com/users/Albacore/repos","events_url":"https://api.github.com/users/Albacore/events{/privacy}","received_events_url":"https://api.github.com/users/Albacore/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Albacore/albacore","description":"Albacore is a professional quality suite of Rake tasks for building .NET or Mono based systems.","fork":false,"url":"https://api.github.com/repos/Albacore/albacore","forks_url":"https://api.github.com/repos/Albacore/albacore/forks","keys_url":"https://api.github.com/repos/Albacore/albacore/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Albacore/albacore/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Albacore/albacore/teams","hooks_url":"https://api.github.com/repos/Albacore/albacore/hooks","issue_events_url":"https://api.github.com/repos/Albacore/albacore/issues/events{/number}","events_url":"https://api.github.com/repos/Albacore/albacore/events","assignees_url":"https://api.github.com/repos/Albacore/albacore/assignees{/user}","branches_url":"https://api.github.com/repos/Albacore/albacore/branches{/branch}","tags_url":"https://api.github.com/repos/Albacore/albacore/tags","blobs_url":"https://api.github.com/repos/Albacore/albacore/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Albacore/albacore/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Albacore/albacore/git/refs{/sha}","trees_url":"https://api.github.com/repos/Albacore/albacore/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Albacore/albacore/statuses/{sha}","languages_url":"https://api.github.com/repos/Albacore/albacore/languages","stargazers_url":"https://api.github.com/repos/Albacore/albacore/stargazers","contributors_url":"https://api.github.com/repos/Albacore/albacore/contributors","subscribers_url":"https://api.github.com/repos/Albacore/albacore/subscribers","subscription_url":"https://api.github.com/repos/Albacore/albacore/subscription","commits_url":"https://api.github.com/repos/Albacore/albacore/commits{/sha}","git_commits_url":"https://api.github.com/repos/Albacore/albacore/git/commits{/sha}","comments_url":"https://api.github.com/repos/Albacore/albacore/comments{/number}","issue_comment_url":"https://api.github.com/repos/Albacore/albacore/issues/comments{/number}","contents_url":"https://api.github.com/repos/Albacore/albacore/contents/{+path}","compare_url":"https://api.github.com/repos/Albacore/albacore/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Albacore/albacore/merges","archive_url":"https://api.github.com/repos/Albacore/albacore/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Albacore/albacore/downloads","issues_url":"https://api.github.com/repos/Albacore/albacore/issues{/number}","pulls_url":"https://api.github.com/repos/Albacore/albacore/pulls{/number}","milestones_url":"https://api.github.com/repos/Albacore/albacore/milestones{/number}","notifications_url":"https://api.github.com/repos/Albacore/albacore/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Albacore/albacore/labels{/name}","releases_url":"https://api.github.com/repos/Albacore/albacore/releases{/id}","deployments_url":"https://api.github.com/repos/Albacore/albacore/deployments","created_at":"2012-08-23T12:47:31Z","updated_at":"2016-06-17T17:43:31Z","pushed_at":"2016-07-14T02:15:10Z","git_url":"git://github.com/Albacore/albacore.git","ssh_url":"git@github.com:Albacore/albacore.git","clone_url":"https://github.com/Albacore/albacore.git","svn_url":"https://github.com/Albacore/albacore","homepage":"www.albacorebuild.net","size":32794,"stargazers_count":204,"watchers_count":204,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":66,"mirror_url":null,"open_issues_count":25,"forks":66,"open_issues":25,"watchers":204,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Albacore/albacore/pulls/212"},"html":{"href":"https://github.com/Albacore/albacore/pull/212"},"issue":{"href":"https://api.github.com/repos/Albacore/albacore/issues/212"},"comments":{"href":"https://api.github.com/repos/Albacore/albacore/issues/212/comments"},"review_comments":{"href":"https://api.github.com/repos/Albacore/albacore/pulls/212/comments"},"review_comment":{"href":"https://api.github.com/repos/Albacore/albacore/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Albacore/albacore/pulls/212/commits"},"statuses":{"href":"https://api.github.com/repos/Albacore/albacore/statuses/fab8026e094815061b7a6935e469fbed2af0c5b5"}},"merged":false,"mergeable":true,"mergeable_state":"unstable","merged_by":null,"comments":0,"review_comments":0,"commits":11,"additions":282,"deletions":89,"changed_files":2}}
{"actor":{"display_login":"blairconrad"}}