Skip to content

Commit

Permalink
Added config test for :simpletext formatter
Browse files Browse the repository at this point in the history
  • Loading branch information
robd committed May 6, 2015
1 parent 92590aa commit e4e0a1a
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions test/unit/test_configuration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -51,15 +51,17 @@ def test_command_map
assert_equal "/opt/sites/example/current/bin ruby", SSHKit.config.command_map[:ruby]
end

def test_setting_formatter_to_dot
assert SSHKit.config.format = :dot
assert SSHKit.config.output.is_a? SSHKit::Formatter::Dot
def test_setting_formatter_types
{
dot: SSHKit::Formatter::Dot,
blackhole: SSHKit::Formatter::BlackHole,
simpletext: SSHKit::Formatter::SimpleText,
}.each do |format, expected_class|
SSHKit.config.format = format
assert SSHKit.config.output.is_a? expected_class
end
end

def test_setting_formatter_to_blackhole
assert SSHKit.config.format = :BlackHole
assert SSHKit.config.output.is_a? SSHKit::Formatter::BlackHole
end
end

end

0 comments on commit e4e0a1a

Please sign in to comment.