Skip to content

Commit a46989d

Browse files
committed
Cleaned up divide cake test
1 parent 9739fc7 commit a46989d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

test_divide_cake.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,25 +19,25 @@
1919
# The actual test
2020
describe 'divide_cake' do
2121
it "works for 11 and 3" do
22-
ProcessPilot::pilot('divide_cake.rb', :force_ruby_process_sync => true, :debug=> true) do |oStdin, iStdout|
22+
ProcessPilot::pilot('divide_cake.rb', :force_ruby_process_sync => true) do |oStdin, iStdout|
2323
iStdout.readpartial(100) # => How many pieces of cake do you have? 11
2424
oStdin.write("11\n")
2525
iStdout.readpartial(100) # => How many people want some cake? 3
2626
oStdin.write("3\n")
2727
output = iStdout.gets.chomp # =>
28-
assert_equal output, "Give each person 3 pieces. There will be 2 additional pieces for you to eat as soon as they leave."
28+
assert_equal "Give each person 3 pieces. There will be 2 additional pieces for you to eat as soon as they leave.", output
2929

3030
end
3131

3232
end
3333
it "works for 4 and 5" do
34-
ProcessPilot::pilot('divide_cake.rb', :force_ruby_process_sync => true, :debug=> true) do |oStdin, iStdout|
34+
ProcessPilot::pilot('divide_cake.rb', :force_ruby_process_sync => true) do |oStdin, iStdout|
3535
iStdout.readpartial(100) # => How many pieces of cake do you have? 11
3636
oStdin.write("4\n")
3737
iStdout.readpartial(100) # => How many people want some cake? 3
3838
oStdin.write("5\n")
3939
output = iStdout.gets.chomp # =>
40-
assert_equal output, "Give each person 0 pieces. There will be 4 additional pieces for you to eat as soon as they leave."
40+
assert_equal "Give each person 0 pieces. There will be 4 additional pieces for you to eat as soon as they leave.", output
4141

4242
end
4343

0 commit comments

Comments
 (0)