Using Mocha::Mock.new is not supported in mocha, and mock() does not work in a subclass of Test::Unit::TestCase
As we just need a stub for File:Statt an no mock, we just create an Object (instead of a mock) and stub it.
I've separated the pull request in two commits:
first, fix rubocop warnings of test/common.rb
second, fix the issue
Fixing the rubocop warnings of test/common.rb makes the PR somehow difficult to read. The fix itself is pretty small:
- stat = Mocha::Mock.new('file::stat')
+ # Stub for File::Stat
+ stat = Object.new
I've proposed this fix as I think you need the unit tests to work in order to make a new release. Would it be possible to release a new version of Net::SCP in the near future? I'd love see issue https://github.com/ytti/oxidized/issues/1802 being closed ;-) Is there something I can do to help producing a new release?
Using Mocha::Mock.new is not supported in mocha, and mock() does not work in a subclass of Test::Unit::TestCase As we just need a stub for File:Statt an no mock, we just create an Object (instead of a mock) and stub it.
I've separated the pull request in two commits:
Fixing the rubocop warnings of test/common.rb makes the PR somehow difficult to read. The fix itself is pretty small:
I've proposed this fix as I think you need the unit tests to work in order to make a new release. Would it be possible to release a new version of Net::SCP in the near future? I'd love see issue https://github.com/ytti/oxidized/issues/1802 being closed ;-) Is there something I can do to help producing a new release?
This PR fixes #72