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
Added option to set specific revision when using Subversion as SCM #1546
Conversation
Deploy config example:
|
Add unit test for feature change (untested)
All the tests failed, could you please try again? |
Sorry for the many commits, I haven't had time yet to set up local testing. |
Existing test cases now pass. I naively tried to add a new test case by copying and modifying it in the same file, but I guess I am missing something. Could you point me in the right direction? marcovtwout@14a0a86 |
context.expects(:execute).with(:svn, :update, '--username someuser', '--password somepassword', '--revision 12345') | ||
context.expects(:fetch).twice.with(:svn_username).returns('someuser') | ||
context.expects(:fetch).twice.with(:svn_password).returns('somepassword') | ||
context.expects(:fetch).once.with(:svn_revision).returns('12345') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this should be context.expects(:fetch).twice
.
… based on the Travis build which is showing the failing test:
Failures:
1) Capistrano::Svn::DefaultStrategy#update_specific_revision should run svn update and update to a specific revision
Failure/Error: subject.update
Mocha::ExpectationError:
unexpected invocation: #<#<Class:0x00000003740b78>:0x3740b28>.fetch(:svn_revision)
unsatisfied expectations:
- expected exactly once, invoked twice: #<#<Class:0x00000003740b78>:0x3740b28>.fetch(:svn_revision)
- expected exactly once, not yet invoked: #<#<Class:0x00000003740b78>:0x3740b28>.execute(:svn, :update, '--username someuser', '--password somepassword', '--revision 12345')
satisfied expectations:
- expected exactly twice, invoked twice: #<#<Class:0x00000003740b78>:0x3740b28>.fetch(:svn_password)
- expected exactly twice, invoked twice: #<#<Class:0x00000003740b78>:0x3740b28>.fetch(:svn_username)
# ./lib/capistrano/scm.rb:51:in `fetch'
# ./lib/capistrano/svn.rb:12:in `svn'
# ./lib/capistrano/svn.rb:32:in `update'
# ./spec/lib/capistrano/svn_spec.rb:77:in `block (3 levels) in <module:Capistrano>'
Updated copyright to 2016
Add unit test for feature change (untested)
Anything left to do before this can be merged? |
I'll double check. Thanks for the ping. |
@marcovtwout Can you add a CHANGELOG entry for this and then squash all the commits down to a single commit? Then I can merge it. Thanks |
No description provided.