Skip to content

Conversation

mislav
Copy link
Contributor

@mislav mislav commented Sep 23, 2020

Bonus: also proposes a new command stubber for tests, one that matches commands by their invocation instead of sequentially and also asserts that all stubs have matched at the end of the test.

Fixes #1820, fixes #1762, fixes #1869, fixes #2001

Our previous command stub mechanism matches stubs sequentially, which leads to brittle tests when the exec calls get reordered or removed in the implementation.
Copy link
Contributor

@samcoe samcoe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like the new stub approach. Seems more flexible and robust than the previous version.

@DanTup
Copy link

DanTup commented Nov 28, 2020

This PR says it fixes #2001, though I believe I'm still seeing that behaviour in the 1.3.0 release from a few days ago (as are others). If I run gh pr create --web it opens "github.com/Org/Repo/compare/master...master" when my changes are in DanTup:master, not the upstream.

@DanTup
Copy link

DanTup commented Nov 28, 2020

Oh, FWIW - seems like this only affects --web. If I drop that, it does create the PR correctly!

@mislav
Copy link
Contributor Author

mislav commented Dec 1, 2020

@DanTup Thanks for the report! We're fixing this already.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

3 participants