500px / gunter

Language agnostic task wrapper and loyal servant.
MIT License
9 stars 1 forks source link

Better tests for .exec using spies and stubs #2

Open devonoel opened 9 years ago

devonoel commented 9 years ago

My tests for executing a task locally and remotely are pretty pathetic right now.

The single remote execution test is actually marked pending, because I don't think it really makes sense to actually execute tasks remotely in a test, even against 127.0.0.1, since you'd have to make an actual SSH connection with your local machine. A combination of spies and stubbing makes more sense to me, so that we can ensure the proper functions are being called, without actually executing anything against a remote host. We can probably make use of Sinon for this.

Same goes for local, where I am actually executing a test command (a simple echo). Again, it probably doesn't make sense to actually execute a command locally like this, its a little bit dangerous.

devonoel commented 9 years ago

Issue #3 is blocking