test/unit/test_configuration.rb in sshkit-0.0.10 vs test/unit/test_configuration.rb in sshkit-0.0.11

- old
+ new

@@ -5,18 +5,22 @@ class TestConfiguration < UnitTest def setup SSHKit.config = nil SSHKit.config.command_map.clear + SSHKit.config.output = SSHKit::Formatter::Pretty.new($stdout) end def test_output assert SSHKit.config.output.is_a? SSHKit::Formatter::Pretty assert SSHKit.config.output = $stderr - assert_equal $stderr, SSHKit.config.output end + def test_default_env + assert SSHKit.config.default_env + end + def test_backend assert_equal SSHKit::Backend::Netssh, SSHKit.config.backend assert SSHKit.config.backend = SSHKit::Backend::Printer assert_equal SSHKit::Backend::Printer, SSHKit.config.backend end @@ -28,8 +32,12 @@ assert SSHKit.config.command_map = cm assert_equal cm, SSHKit.config.command_map assert_equal "/opt/sites/example/current/bin ruby", SSHKit.config.command_map[:ruby] end + def test_setting_formatter + assert SSHKit.config.format = :dot + assert SSHKit.config.output.is_a? SSHKit::Formatter::Dot + end end end