test/test_interaction.rb in expectr-1.1.0 vs test/test_interaction.rb in expectr-1.1.1

- old
+ new

@@ -36,30 +36,30 @@ sleep 2 assert_raises(Expectr::ProcessError) { @exp.send("test\n") } end def test_winsize_set - assert_not_equal [0, 0], @exp.winsize + assert_not_equal([0, 0], @exp.winsize) end def test_interact_sets_appropriate_flags [ Thread.new { - assert_equal false, @exp.interact? + assert_equal(false, @exp.interact?) sleep 0.5 @exp.interact!.join }, Thread.new { sleep 1 - assert_equal true, @exp.flush_buffer - assert_equal true, @exp.interact? + assert_equal(true, @exp.flush_buffer) + assert_equal(true, @exp.interact?) @exp.flush_buffer = false @exp.send("quit\n") } - ].each {|x| x.join} + ].each { |x| x.join } end def test_interact_mode [ Thread.new { @@ -70,13 +70,13 @@ sleep 1 @exp.flush_buffer = false @exp.send("300+21\n") @exp.send("quit\n") } - ].each {|x| x.join} + ].each { |x| x.join } - assert_not_nil @exp.expect(/321/) + assert_not_nil(@exp.expect(/321/)) end def test_leaving_interact_mode [ Thread.new { @@ -85,14 +85,14 @@ }, Thread.new { sleep 1 @exp.flush_buffer = false assert_nothing_raised { @exp.leave! } - assert_equal false, @exp.interact? + assert_equal(false, @exp.interact?) @exp.send("quit\n") } - ].each {|x| x.join} + ].each { |x| x.join } end def test_blocking_interact_mode [ Thread.new { @@ -103,10 +103,10 @@ sleep 1 @exp.flush_buffer = false @exp.send("300+21\n") @exp.send("quit\n") } - ].each {|x| x.join} + ].each { |x| x.join } - assert_not_nil @exp.expect(/321/) + assert_not_nil(@exp.expect(/321/)) end end