-
Notifications
You must be signed in to change notification settings - Fork 759
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Logical not quite right for install_github_single #388
Comments
That's what I get for not testing it... A fix is just being tested by Travis. @hadley: I need to mock |
Don't know of any mocking frameworks in R, sorry :/ Not even sure how you'd attack the problem - I guess you could temporarily functions in the right environment. |
If I understand correctly, you want to put in a temporary replacement version of
There are some limitations of doing it this way. If you want to call the mock function indirectly (via another function that's not copied to the new environment), it won't work right. To get around this issue, you could copy over everything from the namespace into the new environment, and simply replace the mocked function, but this could be slow if you're running a lot of tests. All of this is overkill for this one test, but it's a way you could do mocking in general. |
@wch: Thanks for the writeup. Perhaps one day... For now, I hope my hack will do. |
e.g.
install_github("hadley/ggplot2#878")
fails with "Must specify either a ref or a pull request".Can you take a look @krlmlr?
The text was updated successfully, but these errors were encountered: