* Accept SFTP session in FS constructor;
* Modify Remote to build the session required by FS;
* Change TestEnvHelpers#build_remote in order to provided a test double
as the remote FS.
Allow use of our test environment, with a mocked remote and convenient
methods to write more concise expectations.
#env, builds and returns a memoized test environment (with mocked
remote)
#output, returns env output as a string
#remote_fs, returns env remote fs
#expect_execution, setup a remote command execution expectation
* Fix coding standards;
* Simplify some expectations (eq instead of be matcher);
* Expect identity on block instead of calling;
* Change some before call as oneliners;
* Avoid shadowing variable names;
* Improve wording where needed.
* Allow no_* to be used for every tests in condition DSL:
condition { no_has_env :shell, '/bin/sh' };
* Modify Test constructor to accept negated: named argument, implement
#negated? and #pass?;
* Rename #success? to #verify in all test classes.
This class is included in net-ssh, but net-sftp adds some new methods
that we need for our tests. This code resides in net-sftp test helper,
and can't be required dynamicaly, this change adds a copy of the code we
need, hardcoded in NetSSHStoryHelpers.
In Condition:
* Modify constructor to accepts tests and a default return value;
* Implement #met?;
* Modify #! so that it return the negated value returned by #met?.
In Condition::DSL:
* Modify .evaluate to build the condition with tests and the value
returned by a the evaluated condition block.
Add a basic Test base class, with env and arguments as attributes.
Add some spec helpers to build some easily testable kind of Test
instances (as test doubles).