spec/sconb_spec.rb in sconb-0.0.6 vs spec/sconb_spec.rb in sconb-0.0.7

- old
+ new

@@ -57,9 +57,40 @@ } } OUT end + it "should convert from multi config to JSON with filter" do + expect(capture(:stdout) { + Sconb::CLI.new.invoke(:dump, ['gis?t'], {config: File.expand_path('../config_test_multi', __FILE__)}) + }).to eq <<OUT +{ + "github.com": { + "Host": "github.com", + "User": "git", + "Port": "22", + "Hostname": "github.com", + "IdentityFile": [ + "spec/github_rsa" + ], + "TCPKeepAlive": "yes", + "IdentitiesOnly": "yes" + }, + "gist": { + "Host": "gist", + "User": "git", + "Port": "22", + "Hostname": "gist.github.com", + "IdentityFile": [ + "spec/github_rsa" + ], + "TCPKeepAlive": "yes", + "IdentitiesOnly": "yes" + } +} +OUT + end + it "should convert from .ssh/config to JSON with private keys" do expect(capture(:stdout) { Sconb::CLI.new.invoke(:dump, [], {config: File.expand_path('../config_test', __FILE__), all: true}) }).to eq <<OUT {