On 25 Oct 2010, at 09:54, Haim Ashkenazi wrote:
Thanks in advance
(Moved your reply inline.)
The rescuing that you do in line 56 of CLI#run was obscuring the real
- The CLI interface when run with subcommand shell should correctly
host definition (cust2 => dc => somehost) doesn’t exist!
I found this by commenting out the lines where you rescue the exception
and raise a Trollop error instead.
So the example wasn’t even reaching the line in CLI#run_shell where you
create the SshBackend, because it was failing on the get_host call
(since the example uses dummy data).
I got the example to pass by also mocking/stubbing the ConfigFile stored
in @c, and stubbing its get_host method:
If you want to mock everything outside of the CLI object in this spec,
that’s one (not hugely elegant) way to do it.
When you have problems like this, it’s helpful to dig down and find the
exact place the error is occurring.
-----BEGIN PGP SIGNED MESSAGE-----
On Oct 26, 2010, at 11:15 AM, Chris M. wrote:
The repository is here: http://github.com/babysnakes/runssh
Wow, that was a stupid mistake. Thanks for the time, the good eye and
I actually don’t need to stub everything, I just had to fix the path to
match the fixtures.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Darwin)
-----END PGP SIGNATURE-----