{"action":"created","issue":{"url":"https://api.github.com/repos/Homebrew/brew/issues/559","repository_url":"https://api.github.com/repos/Homebrew/brew","labels_url":"https://api.github.com/repos/Homebrew/brew/issues/559/labels{/name}","comments_url":"https://api.github.com/repos/Homebrew/brew/issues/559/comments","events_url":"https://api.github.com/repos/Homebrew/brew/issues/559/events","html_url":"https://github.com/Homebrew/brew/pull/559","id":166474394,"number":559,"title":"tests: add cmd/switch integration test","user":{"login":"eirinikos","id":9170701,"avatar_url":"https://avatars.githubusercontent.com/u/9170701?v=3","gravatar_id":"","url":"https://api.github.com/users/eirinikos","html_url":"https://github.com/eirinikos","followers_url":"https://api.github.com/users/eirinikos/followers","following_url":"https://api.github.com/users/eirinikos/following{/other_user}","gists_url":"https://api.github.com/users/eirinikos/gists{/gist_id}","starred_url":"https://api.github.com/users/eirinikos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eirinikos/subscriptions","organizations_url":"https://api.github.com/users/eirinikos/orgs","repos_url":"https://api.github.com/users/eirinikos/repos","events_url":"https://api.github.com/users/eirinikos/events{/privacy}","received_events_url":"https://api.github.com/users/eirinikos/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Homebrew/brew/labels/gsoc-outreachy","name":"gsoc-outreachy","color":"213954"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2016-07-20T01:22:45Z","updated_at":"2016-07-27T19:11:33Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/Homebrew/brew/pulls/559","html_url":"https://github.com/Homebrew/brew/pull/559","diff_url":"https://github.com/Homebrew/brew/pull/559.diff","patch_url":"https://github.com/Homebrew/brew/pull/559.patch"},"body":"- [x] Have you followed the guidelines in our [Contributing](https://github.com/Homebrew/brew/blob/master/.github/CONTRIBUTING.md) document?\r\n- [x] Have you checked to ensure there aren't other open [Pull Requests](https://github.com/Homebrew/brew/pulls) for the same change?\r\n- [x] Have you added an explanation of what your changes do and why you'd like us to include them?\r\n- [ ] Have you written new tests for your changes? [Here's an example](https://github.com/Homebrew/homebrew/pull/49031).\r\n- [x] Have you successfully run `brew tests` with your changes locally?\r\n\r\n-----\r\n\r\nThis change adds test coverage for `brew switch`.\r\n\r\nSince [these lines](https://github.com/Homebrew/brew/blob/master/Library/Homebrew/cmd/switch.rb#L20-L33) return exit codes that fall outside the purview of `cmd_fail`, would it be OK to add another helper method to address them?\r\n"},"comment":{"url":"https://api.github.com/repos/Homebrew/brew/issues/comments/235689055","html_url":"https://github.com/Homebrew/brew/pull/559#issuecomment-235689055","issue_url":"https://api.github.com/repos/Homebrew/brew/issues/559","id":235689055,"user":{"login":"eirinikos","id":9170701,"avatar_url":"https://avatars.githubusercontent.com/u/9170701?v=3","gravatar_id":"","url":"https://api.github.com/users/eirinikos","html_url":"https://github.com/eirinikos","followers_url":"https://api.github.com/users/eirinikos/followers","following_url":"https://api.github.com/users/eirinikos/following{/other_user}","gists_url":"https://api.github.com/users/eirinikos/gists{/gist_id}","starred_url":"https://api.github.com/users/eirinikos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eirinikos/subscriptions","organizations_url":"https://api.github.com/users/eirinikos/orgs","repos_url":"https://api.github.com/users/eirinikos/repos","events_url":"https://api.github.com/users/eirinikos/events{/privacy}","received_events_url":"https://api.github.com/users/eirinikos/received_events","type":"User","site_admin":false},"created_at":"2016-07-27T19:11:33Z","updated_at":"2016-07-27T19:11:33Z","body":"> Since most of your PRs end up modifying the end of the `test_integration_cmds.rb` file, every merged PR is going to cause another to have merge conflicts. I guess that's a nice way to have more practice with `git rebase`. 😸 In the future, those kinds of conflicts could be minimized if the test methods were roughly added in alphabetical order instead of appending them to the existing ones. (But there's nothing fundamentally wrong with how you've done things thus far.)\r\n\r\nGood idea, thanks! I'll keep this in mind for future reference. In the meantime, yes, it has been good to have more practice with `git rebase` (which is exactly what I've just done for this branch). 😄 \r\n\r\n> In some cases the command output itself isn't very useful and checking it additionally doesn't provide any added value. But more often than not the expected failure cannot be trivially inferred from the invocation alone, thus an assert on the error message provides an additional clue as to what the test is checking. (And the additional assert is basically free, as it is significantly less expensive than the `cmd[_fail]` call.)\r\n\r\nThanks for the explanation!"}}
{"actor":{"display_login":"eirinikos"}}