- Коректно
 - 7 успешни тест(а)
 - 0 неуспешни тест(а)
 
....... Finished in 0.00641 seconds 7 examples, 0 failures
Срокът за предаване на решения е отминал
След дълга вечер, прекарана в решаване на интеграли, Весела Радостинова се сетила, че има изключително важна задача, която не е успяла да реши все още - да форматира текст по един специален начин, изискван от клиента на проект, по който работи. Но Весела била твърде изморена и се обърнала към добрите студенти от курса по Руби, с отчаян зов за помощ, като в замяна обещала да ви реши всичките интеграли.
Вашето първо предизвикателство е да помогнете на Весела, като напишете функцията format_string(string, width). Все още не сме казали как се дефинира функция в Ruby, но разчитаме на вашите умения да изровите тази информация.
Функцията трябва да приема непразен низ от символи string и естесвено число width, и го обработва по следния начин:
width - допълва го поравно и от двете страни с интервали, така че дължината на низа да бъде равна на width. Това допълване се прави само ако дължината на текста след първите три стъпки е по-малка от параметъра width. Допълнително, ако width - дължината_на_низа_преди_центрирането е нечетно число, "нечетният" интервал трябва да се добави в края на низа.# =>
Текстът след символа # е коментар. С конвенцията # => резултат в края на ред с код ще означаваме резултата, който се очаква след изпълнението на въпросния код.
format_string("run  FOrest   run!!", 20)            # => "  RUN FOREST RUN!!  "
format_string("  do YouR   homeWork   NoW    ", 10) # => "DO YOUR HOMEWORK NOW"
format_string("bacon", 6)                           # => "BACON "
Няма да ви подаваме некоректни данни за вход.
Ако имате въпроси, които не успявате да решите сами, пишете във форума. Ако обаче въпросите ви съдържат конкретен код от решението ви, ни изпратете имейл.
Примерните тестове се намират в GitHub хранилището с домашните. За информация как да ги изпълните, погледнете README-то на хранилището.
....... Finished in 0.00641 seconds 7 examples, 0 failures
....... Finished in 0.00654 seconds 7 examples, 0 failures
....... Finished in 0.00643 seconds 7 examples, 0 failures
....... Finished in 0.00864 seconds 7 examples, 0 failures
....... Finished in 0.00637 seconds 7 examples, 0 failures
BACON!!
FBACON!!
FDO YOUR CHALLENGE NOW
FHASTA LA VISTA, BABY!
FODD 
F TRY HARDER! 
F   CHUNKY BACON!!   
F
Failures:
  1) format_string does not change already formatted strings
     Failure/Error: expect(format_string('BACON!!', 5)).to eq 'BACON!!'
       
       expected: "BACON!!"
            got: nil
       
       (compared using ==)
     # /tmp/d20141008-29654-jslqxd/spec.rb:3:in `block (2 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (3 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (2 levels) in <top (required)>'
  2) format_string trims spaces
     Failure/Error: expect(format_string('     BACON!!  ', 0)).to eq 'BACON!!'
       
       expected: "BACON!!"
            got: nil
       
       (compared using ==)
     # /tmp/d20141008-29654-jslqxd/spec.rb:7:in `block (2 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (3 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (2 levels) in <top (required)>'
  3) format_string does not attempt to center the string if the width is less than the one after processing
     Failure/Error: expect(format_string('  do YouR   challengE   NoW    ', 10)).to eq 'DO YOUR CHALLENGE NOW'
       
       expected: "DO YOUR CHALLENGE NOW"
            got: nil
       
       (compared using ==)
     # /tmp/d20141008-29654-jslqxd/spec.rb:11:in `block (2 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (3 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (2 levels) in <top (required)>'
  4) format_string does not attempt to center the string if the width is zero
     Failure/Error: expect(format_string(' HAstA    LA vista,     bAbY!      ', 0)).to eq 'HASTA LA VISTA, BABY!'
       
       expected: "HASTA LA VISTA, BABY!"
            got: nil
       
       (compared using ==)
     # /tmp/d20141008-29654-jslqxd/spec.rb:15:in `block (2 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (3 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (2 levels) in <top (required)>'
  5) format_string appends odd intervals at the end of the string when centering
     Failure/Error: expect(format_string('odd', 4)).to eq 'ODD '
       
       expected: "ODD "
            got: nil
       
       (compared using ==)
     # /tmp/d20141008-29654-jslqxd/spec.rb:19:in `block (2 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (3 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (2 levels) in <top (required)>'
  6) format_string centers strings properly when the length difference is even
     Failure/Error: expect(format_string('try harder!', 13)).to eq ' TRY HARDER! '
       
       expected: " TRY HARDER! "
            got: nil
       
       (compared using ==)
     # /tmp/d20141008-29654-jslqxd/spec.rb:25:in `block (2 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (3 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (2 levels) in <top (required)>'
  7) format_string works with already trimmed strings with greater width padding
     Failure/Error: expect(format_string('chunky   bacon!! ', 20)).to eq '   CHUNKY BACON!!   '
       
       expected: "   CHUNKY BACON!!   "
            got: nil
       
       (compared using ==)
     # /tmp/d20141008-29654-jslqxd/spec.rb:30:in `block (2 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (3 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (2 levels) in <top (required)>'
Finished in 0.00879 seconds
7 examples, 7 failures
Failed examples:
rspec /tmp/d20141008-29654-jslqxd/spec.rb:2 # format_string does not change already formatted strings
rspec /tmp/d20141008-29654-jslqxd/spec.rb:6 # format_string trims spaces
rspec /tmp/d20141008-29654-jslqxd/spec.rb:10 # format_string does not attempt to center the string if the width is less than the one after processing
rspec /tmp/d20141008-29654-jslqxd/spec.rb:14 # format_string does not attempt to center the string if the width is zero
rspec /tmp/d20141008-29654-jslqxd/spec.rb:18 # format_string appends odd intervals at the end of the string when centering
rspec /tmp/d20141008-29654-jslqxd/spec.rb:24 # format_string centers strings properly when the length difference is even
rspec /tmp/d20141008-29654-jslqxd/spec.rb:29 # format_string works with already trimmed strings with greater width padding
....... Finished in 0.00617 seconds 7 examples, 0 failures
....... Finished in 0.00643 seconds 7 examples, 0 failures
....... Finished in 0.00664 seconds 7 examples, 0 failures
....... Finished in 0.00617 seconds 7 examples, 0 failures
....... Finished in 0.00635 seconds 7 examples, 0 failures
-1.0 .-3.5 .-5.5 .-10.5 .0.5 1.5 2.5 .1.0 2.0 .3.0 . Finished in 0.00737 seconds 7 examples, 0 failures
....... Finished in 0.0067 seconds 7 examples, 0 failures
....... Finished in 0.00623 seconds 7 examples, 0 failures
RUN FOREST RUN!!  
DO YOUR HOMEWORK NOW
BACON 
.....F.
Failures:
  1) format_string centers strings properly when the length difference is even
     Failure/Error: expect(format_string('try harder!', 13)).to eq ' TRY HARDER! '
       
       expected: " TRY HARDER! "
            got: "TRY HARDER!  "
       
       (compared using ==)
     # /tmp/d20141008-29654-z2xty0/spec.rb:25:in `block (2 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (3 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (2 levels) in <top (required)>'
Finished in 0.00726 seconds
7 examples, 1 failure
Failed examples:
rspec /tmp/d20141008-29654-z2xty0/spec.rb:24 # format_string centers strings properly when the length difference is even
....... Finished in 0.00677 seconds 7 examples, 0 failures
"BACON!!"
F"BACON!!"
F"DO YOUR CHALLENGE NOW"
F"HASTA LA VISTA, BABY!"
F"ODD "
F" TRY HARDER! "
F"   CHUNKY BACON!!   "
F
Failures:
  1) format_string does not change already formatted strings
     Failure/Error: expect(format_string('BACON!!', 5)).to eq 'BACON!!'
       
       expected: "BACON!!"
            got: nil
       
       (compared using ==)
     # /tmp/d20141008-29654-141yxcq/spec.rb:3:in `block (2 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (3 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (2 levels) in <top (required)>'
  2) format_string trims spaces
     Failure/Error: expect(format_string('     BACON!!  ', 0)).to eq 'BACON!!'
       
       expected: "BACON!!"
            got: nil
       
       (compared using ==)
     # /tmp/d20141008-29654-141yxcq/spec.rb:7:in `block (2 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (3 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (2 levels) in <top (required)>'
  3) format_string does not attempt to center the string if the width is less than the one after processing
     Failure/Error: expect(format_string('  do YouR   challengE   NoW    ', 10)).to eq 'DO YOUR CHALLENGE NOW'
       
       expected: "DO YOUR CHALLENGE NOW"
            got: nil
       
       (compared using ==)
     # /tmp/d20141008-29654-141yxcq/spec.rb:11:in `block (2 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (3 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (2 levels) in <top (required)>'
  4) format_string does not attempt to center the string if the width is zero
     Failure/Error: expect(format_string(' HAstA    LA vista,     bAbY!      ', 0)).to eq 'HASTA LA VISTA, BABY!'
       
       expected: "HASTA LA VISTA, BABY!"
            got: nil
       
       (compared using ==)
     # /tmp/d20141008-29654-141yxcq/spec.rb:15:in `block (2 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (3 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (2 levels) in <top (required)>'
  5) format_string appends odd intervals at the end of the string when centering
     Failure/Error: expect(format_string('odd', 4)).to eq 'ODD '
       
       expected: "ODD "
            got: nil
       
       (compared using ==)
     # /tmp/d20141008-29654-141yxcq/spec.rb:19:in `block (2 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (3 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (2 levels) in <top (required)>'
  6) format_string centers strings properly when the length difference is even
     Failure/Error: expect(format_string('try harder!', 13)).to eq ' TRY HARDER! '
       
       expected: " TRY HARDER! "
            got: nil
       
       (compared using ==)
     # /tmp/d20141008-29654-141yxcq/spec.rb:25:in `block (2 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (3 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (2 levels) in <top (required)>'
  7) format_string works with already trimmed strings with greater width padding
     Failure/Error: expect(format_string('chunky   bacon!! ', 20)).to eq '   CHUNKY BACON!!   '
       
       expected: "   CHUNKY BACON!!   "
            got: nil
       
       (compared using ==)
     # /tmp/d20141008-29654-141yxcq/spec.rb:30:in `block (2 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (3 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (2 levels) in <top (required)>'
Finished in 0.00716 seconds
7 examples, 7 failures
Failed examples:
rspec /tmp/d20141008-29654-141yxcq/spec.rb:2 # format_string does not change already formatted strings
rspec /tmp/d20141008-29654-141yxcq/spec.rb:6 # format_string trims spaces
rspec /tmp/d20141008-29654-141yxcq/spec.rb:10 # format_string does not attempt to center the string if the width is less than the one after processing
rspec /tmp/d20141008-29654-141yxcq/spec.rb:14 # format_string does not attempt to center the string if the width is zero
rspec /tmp/d20141008-29654-141yxcq/spec.rb:18 # format_string appends odd intervals at the end of the string when centering
rspec /tmp/d20141008-29654-141yxcq/spec.rb:24 # format_string centers strings properly when the length difference is even
rspec /tmp/d20141008-29654-141yxcq/spec.rb:29 # format_string works with already trimmed strings with greater width padding
BACON!!FBACON!! FDO YOUR C HALLENGE NOWFHASTA LA VISTA, BABY! FODD F TRY HARDER! F   CHUNKY BACON!!   F
Failures:
  1) format_string does not change already formatted strings
     Failure/Error: expect(format_string('BACON!!', 5)).to eq 'BACON!!'
       
       expected: "BACON!!"
            got: nil
       
       (compared using ==)
     # /tmp/d20141008-29654-1gnhddc/spec.rb:3:in `block (2 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (3 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (2 levels) in <top (required)>'
  2) format_string trims spaces
     Failure/Error: expect(format_string('     BACON!!  ', 0)).to eq 'BACON!!'
       
       expected: "BACON!!"
            got: nil
       
       (compared using ==)
     # /tmp/d20141008-29654-1gnhddc/spec.rb:7:in `block (2 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (3 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (2 levels) in <top (required)>'
  3) format_string does not attempt to center the string if the width is less than the one after processing
     Failure/Error: expect(format_string('  do YouR   challengE   NoW    ', 10)).to eq 'DO YOUR CHALLENGE NOW'
       
       expected: "DO YOUR CHALLENGE NOW"
            got: nil
       
       (compared using ==)
     # /tmp/d20141008-29654-1gnhddc/spec.rb:11:in `block (2 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (3 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (2 levels) in <top (required)>'
  4) format_string does not attempt to center the string if the width is zero
     Failure/Error: expect(format_string(' HAstA    LA vista,     bAbY!      ', 0)).to eq 'HASTA LA VISTA, BABY!'
       
       expected: "HASTA LA VISTA, BABY!"
            got: nil
       
       (compared using ==)
     # /tmp/d20141008-29654-1gnhddc/spec.rb:15:in `block (2 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (3 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (2 levels) in <top (required)>'
  5) format_string appends odd intervals at the end of the string when centering
     Failure/Error: expect(format_string('odd', 4)).to eq 'ODD '
       
       expected: "ODD "
            got: nil
       
       (compared using ==)
     # /tmp/d20141008-29654-1gnhddc/spec.rb:19:in `block (2 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (3 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (2 levels) in <top (required)>'
  6) format_string centers strings properly when the length difference is even
     Failure/Error: expect(format_string('try harder!', 13)).to eq ' TRY HARDER! '
       
       expected: " TRY HARDER! "
            got: nil
       
       (compared using ==)
     # /tmp/d20141008-29654-1gnhddc/spec.rb:25:in `block (2 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (3 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (2 levels) in <top (required)>'
  7) format_string works with already trimmed strings with greater width padding
     Failure/Error: expect(format_string('chunky   bacon!! ', 20)).to eq '   CHUNKY BACON!!   '
       
       expected: "   CHUNKY BACON!!   "
            got: nil
       
       (compared using ==)
     # /tmp/d20141008-29654-1gnhddc/spec.rb:30:in `block (2 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (3 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (2 levels) in <top (required)>'
Finished in 0.00706 seconds
7 examples, 7 failures
Failed examples:
rspec /tmp/d20141008-29654-1gnhddc/spec.rb:2 # format_string does not change already formatted strings
rspec /tmp/d20141008-29654-1gnhddc/spec.rb:6 # format_string trims spaces
rspec /tmp/d20141008-29654-1gnhddc/spec.rb:10 # format_string does not attempt to center the string if the width is less than the one after processing
rspec /tmp/d20141008-29654-1gnhddc/spec.rb:14 # format_string does not attempt to center the string if the width is zero
rspec /tmp/d20141008-29654-1gnhddc/spec.rb:18 # format_string appends odd intervals at the end of the string when centering
rspec /tmp/d20141008-29654-1gnhddc/spec.rb:24 # format_string centers strings properly when the length difference is even
rspec /tmp/d20141008-29654-1gnhddc/spec.rb:29 # format_string works with already trimmed strings with greater width padding
....... Finished in 0.00673 seconds 7 examples, 0 failures
....... Finished in 0.0077 seconds 7 examples, 0 failures
....... Finished in 0.00934 seconds 7 examples, 0 failures
....... Finished in 0.00757 seconds 7 examples, 0 failures
....... Finished in 0.00621 seconds 7 examples, 0 failures
....... Finished in 0.00635 seconds 7 examples, 0 failures
F...FF.
Failures:
  1) format_string does not change already formatted strings
     Failure/Error: expect(format_string('BACON!!', 5)).to eq 'BACON!!'
     NoMethodError:
       undefined method `upcase!' for nil:NilClass
     # /tmp/d20141008-29654-1w9imw2/solution.rb:2:in `format_string'
     # /tmp/d20141008-29654-1w9imw2/spec.rb:3:in `block (2 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (3 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (2 levels) in <top (required)>'
  2) format_string appends odd intervals at the end of the string when centering
     Failure/Error: expect(format_string('odd', 4)).to eq 'ODD '
     NoMethodError:
       undefined method `upcase!' for nil:NilClass
     # /tmp/d20141008-29654-1w9imw2/solution.rb:2:in `format_string'
     # /tmp/d20141008-29654-1w9imw2/spec.rb:19:in `block (2 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (3 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (2 levels) in <top (required)>'
  3) format_string centers strings properly when the length difference is even
     Failure/Error: expect(format_string('try harder!', 13)).to eq ' TRY HARDER! '
     NoMethodError:
       undefined method `upcase!' for nil:NilClass
     # /tmp/d20141008-29654-1w9imw2/solution.rb:2:in `format_string'
     # /tmp/d20141008-29654-1w9imw2/spec.rb:25:in `block (2 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (3 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (2 levels) in <top (required)>'
Finished in 0.00625 seconds
7 examples, 3 failures
Failed examples:
rspec /tmp/d20141008-29654-1w9imw2/spec.rb:2 # format_string does not change already formatted strings
rspec /tmp/d20141008-29654-1w9imw2/spec.rb:18 # format_string appends odd intervals at the end of the string when centering
rspec /tmp/d20141008-29654-1w9imw2/spec.rb:24 # format_string centers strings properly when the length difference is even
BACON 
DO YOUR HOMEWORK NOW
  RUN FOREST RUN!!  
NQKYV TEST DA VIDIM
 DRUG TEST ZA DA SME SIGURNI  
BACON!!
FBACON!!
FDO YOUR CHALLENGE NOW
FHASTA LA VISTA, BABY!
FODD 
F TRY HARDER! 
F   CHUNKY BACON!!   
F
Failures:
  1) format_string does not change already formatted strings
     Failure/Error: expect(format_string('BACON!!', 5)).to eq 'BACON!!'
       
       expected: "BACON!!"
            got: nil
       
       (compared using ==)
     # /tmp/d20141008-29654-1nudtum/spec.rb:3:in `block (2 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (3 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (2 levels) in <top (required)>'
  2) format_string trims spaces
     Failure/Error: expect(format_string('     BACON!!  ', 0)).to eq 'BACON!!'
       
       expected: "BACON!!"
            got: nil
       
       (compared using ==)
     # /tmp/d20141008-29654-1nudtum/spec.rb:7:in `block (2 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (3 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (2 levels) in <top (required)>'
  3) format_string does not attempt to center the string if the width is less than the one after processing
     Failure/Error: expect(format_string('  do YouR   challengE   NoW    ', 10)).to eq 'DO YOUR CHALLENGE NOW'
       
       expected: "DO YOUR CHALLENGE NOW"
            got: nil
       
       (compared using ==)
     # /tmp/d20141008-29654-1nudtum/spec.rb:11:in `block (2 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (3 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (2 levels) in <top (required)>'
  4) format_string does not attempt to center the string if the width is zero
     Failure/Error: expect(format_string(' HAstA    LA vista,     bAbY!      ', 0)).to eq 'HASTA LA VISTA, BABY!'
       
       expected: "HASTA LA VISTA, BABY!"
            got: nil
       
       (compared using ==)
     # /tmp/d20141008-29654-1nudtum/spec.rb:15:in `block (2 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (3 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (2 levels) in <top (required)>'
  5) format_string appends odd intervals at the end of the string when centering
     Failure/Error: expect(format_string('odd', 4)).to eq 'ODD '
       
       expected: "ODD "
            got: nil
       
       (compared using ==)
     # /tmp/d20141008-29654-1nudtum/spec.rb:19:in `block (2 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (3 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (2 levels) in <top (required)>'
  6) format_string centers strings properly when the length difference is even
     Failure/Error: expect(format_string('try harder!', 13)).to eq ' TRY HARDER! '
       
       expected: " TRY HARDER! "
            got: nil
       
       (compared using ==)
     # /tmp/d20141008-29654-1nudtum/spec.rb:25:in `block (2 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (3 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (2 levels) in <top (required)>'
  7) format_string works with already trimmed strings with greater width padding
     Failure/Error: expect(format_string('chunky   bacon!! ', 20)).to eq '   CHUNKY BACON!!   '
       
       expected: "   CHUNKY BACON!!   "
            got: nil
       
       (compared using ==)
     # /tmp/d20141008-29654-1nudtum/spec.rb:30:in `block (2 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (3 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (2 levels) in <top (required)>'
Finished in 0.00727 seconds
7 examples, 7 failures
Failed examples:
rspec /tmp/d20141008-29654-1nudtum/spec.rb:2 # format_string does not change already formatted strings
rspec /tmp/d20141008-29654-1nudtum/spec.rb:6 # format_string trims spaces
rspec /tmp/d20141008-29654-1nudtum/spec.rb:10 # format_string does not attempt to center the string if the width is less than the one after processing
rspec /tmp/d20141008-29654-1nudtum/spec.rb:14 # format_string does not attempt to center the string if the width is zero
rspec /tmp/d20141008-29654-1nudtum/spec.rb:18 # format_string appends odd intervals at the end of the string when centering
rspec /tmp/d20141008-29654-1nudtum/spec.rb:24 # format_string centers strings properly when the length difference is even
rspec /tmp/d20141008-29654-1nudtum/spec.rb:29 # format_string works with already trimmed strings with greater width padding
BACON!!
FBACON!!
FDO YOUR CHALLENGE NOW
FHASTA LA VISTA, BABY!
FODD 
F TRY HARDER! 
F   CHUNKY BACON!!   
F
Failures:
  1) format_string does not change already formatted strings
     Failure/Error: expect(format_string('BACON!!', 5)).to eq 'BACON!!'
       
       expected: "BACON!!"
            got: nil
       
       (compared using ==)
     # /tmp/d20141008-29654-11o95z2/spec.rb:3:in `block (2 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (3 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (2 levels) in <top (required)>'
  2) format_string trims spaces
     Failure/Error: expect(format_string('     BACON!!  ', 0)).to eq 'BACON!!'
       
       expected: "BACON!!"
            got: nil
       
       (compared using ==)
     # /tmp/d20141008-29654-11o95z2/spec.rb:7:in `block (2 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (3 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (2 levels) in <top (required)>'
  3) format_string does not attempt to center the string if the width is less than the one after processing
     Failure/Error: expect(format_string('  do YouR   challengE   NoW    ', 10)).to eq 'DO YOUR CHALLENGE NOW'
       
       expected: "DO YOUR CHALLENGE NOW"
            got: nil
       
       (compared using ==)
     # /tmp/d20141008-29654-11o95z2/spec.rb:11:in `block (2 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (3 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (2 levels) in <top (required)>'
  4) format_string does not attempt to center the string if the width is zero
     Failure/Error: expect(format_string(' HAstA    LA vista,     bAbY!      ', 0)).to eq 'HASTA LA VISTA, BABY!'
       
       expected: "HASTA LA VISTA, BABY!"
            got: nil
       
       (compared using ==)
     # /tmp/d20141008-29654-11o95z2/spec.rb:15:in `block (2 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (3 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (2 levels) in <top (required)>'
  5) format_string appends odd intervals at the end of the string when centering
     Failure/Error: expect(format_string('odd', 4)).to eq 'ODD '
       
       expected: "ODD "
            got: nil
       
       (compared using ==)
     # /tmp/d20141008-29654-11o95z2/spec.rb:19:in `block (2 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (3 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (2 levels) in <top (required)>'
  6) format_string centers strings properly when the length difference is even
     Failure/Error: expect(format_string('try harder!', 13)).to eq ' TRY HARDER! '
       
       expected: " TRY HARDER! "
            got: nil
       
       (compared using ==)
     # /tmp/d20141008-29654-11o95z2/spec.rb:25:in `block (2 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (3 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (2 levels) in <top (required)>'
  7) format_string works with already trimmed strings with greater width padding
     Failure/Error: expect(format_string('chunky   bacon!! ', 20)).to eq '   CHUNKY BACON!!   '
       
       expected: "   CHUNKY BACON!!   "
            got: nil
       
       (compared using ==)
     # /tmp/d20141008-29654-11o95z2/spec.rb:30:in `block (2 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (3 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (2 levels) in <top (required)>'
Finished in 0.00724 seconds
7 examples, 7 failures
Failed examples:
rspec /tmp/d20141008-29654-11o95z2/spec.rb:2 # format_string does not change already formatted strings
rspec /tmp/d20141008-29654-11o95z2/spec.rb:6 # format_string trims spaces
rspec /tmp/d20141008-29654-11o95z2/spec.rb:10 # format_string does not attempt to center the string if the width is less than the one after processing
rspec /tmp/d20141008-29654-11o95z2/spec.rb:14 # format_string does not attempt to center the string if the width is zero
rspec /tmp/d20141008-29654-11o95z2/spec.rb:18 # format_string appends odd intervals at the end of the string when centering
rspec /tmp/d20141008-29654-11o95z2/spec.rb:24 # format_string centers strings properly when the length difference is even
rspec /tmp/d20141008-29654-11o95z2/spec.rb:29 # format_string works with already trimmed strings with greater width padding
....... Finished in 0.00639 seconds 7 examples, 0 failures
....... Finished in 0.0082 seconds 7 examples, 0 failures
....... Finished in 0.00658 seconds 7 examples, 0 failures
/tmp/d20141008-29654-7elqct/solution.rb:5:in `format_string': undefined method `retun' for main:Object (NoMethodError) from /tmp/d20141008-29654-7elqct/solution.rb:7:in `<top (required)>' from /data/rails/evans-2014/shared/bundle/ruby/2.1.0/gems/rspec-core-2.14.7/lib/rspec/core/configuration.rb:867:in `require' from /data/rails/evans-2014/shared/bundle/ruby/2.1.0/gems/rspec-core-2.14.7/lib/rspec/core/configuration.rb:867:in `block in setup_load_path_and_require' from /data/rails/evans-2014/shared/bundle/ruby/2.1.0/gems/rspec-core-2.14.7/lib/rspec/core/configuration.rb:867:in `each' from /data/rails/evans-2014/shared/bundle/ruby/2.1.0/gems/rspec-core-2.14.7/lib/rspec/core/configuration.rb:867:in `setup_load_path_and_require' from /data/rails/evans-2014/shared/bundle/ruby/2.1.0/gems/rspec-core-2.14.7/lib/rspec/core/configuration_options.rb:25:in `configure' from /data/rails/evans-2014/shared/bundle/ruby/2.1.0/gems/rspec-core-2.14.7/lib/rspec/core/command_line.rb:21:in `run' from /data/rails/evans-2014/shared/bundle/ruby/2.1.0/gems/rspec-core-2.14.7/lib/rspec/core/runner.rb:80:in `run' from /data/rails/evans-2014/shared/bundle/ruby/2.1.0/gems/rspec-core-2.14.7/lib/rspec/core/runner.rb:17:in `block in autorun'
....... Finished in 0.00645 seconds 7 examples, 0 failures
....... Finished in 0.00639 seconds 7 examples, 0 failures
....... Finished in 0.00639 seconds 7 examples, 0 failures
....... Finished in 0.00629 seconds 7 examples, 0 failures
....... Finished in 0.0063 seconds 7 examples, 0 failures
FFFFFFF
Failures:
  1) format_string does not change already formatted strings
     Failure/Error: expect(format_string('BACON!!', 5)).to eq 'BACON!!'
     NoMethodError:
       undefined method `format_string' for #<RSpec::Core::ExampleGroup::Nested_1:0xb8854d4c>
     # /tmp/d20141008-29654-5a0ic2/spec.rb:3:in `block (2 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (3 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (2 levels) in <top (required)>'
  2) format_string trims spaces
     Failure/Error: expect(format_string('     BACON!!  ', 0)).to eq 'BACON!!'
     NoMethodError:
       undefined method `format_string' for #<RSpec::Core::ExampleGroup::Nested_1:0xb884fcc0>
     # /tmp/d20141008-29654-5a0ic2/spec.rb:7:in `block (2 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (3 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (2 levels) in <top (required)>'
  3) format_string does not attempt to center the string if the width is less than the one after processing
     Failure/Error: expect(format_string('  do YouR   challengE   NoW    ', 10)).to eq 'DO YOUR CHALLENGE NOW'
     NoMethodError:
       undefined method `format_string' for #<RSpec::Core::ExampleGroup::Nested_1:0xb884d86c>
     # /tmp/d20141008-29654-5a0ic2/spec.rb:11:in `block (2 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (3 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (2 levels) in <top (required)>'
  4) format_string does not attempt to center the string if the width is zero
     Failure/Error: expect(format_string(' HAstA    LA vista,     bAbY!      ', 0)).to eq 'HASTA LA VISTA, BABY!'
     NoMethodError:
       undefined method `format_string' for #<RSpec::Core::ExampleGroup::Nested_1:0xb8847e94>
     # /tmp/d20141008-29654-5a0ic2/spec.rb:15:in `block (2 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (3 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (2 levels) in <top (required)>'
  5) format_string appends odd intervals at the end of the string when centering
     Failure/Error: expect(format_string('odd', 4)).to eq 'ODD '
     NoMethodError:
       undefined method `format_string' for #<RSpec::Core::ExampleGroup::Nested_1:0xb8846d8c>
     # /tmp/d20141008-29654-5a0ic2/spec.rb:19:in `block (2 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (3 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (2 levels) in <top (required)>'
  6) format_string centers strings properly when the length difference is even
     Failure/Error: expect(format_string('try harder!', 13)).to eq ' TRY HARDER! '
     NoMethodError:
       undefined method `format_string' for #<RSpec::Core::ExampleGroup::Nested_1:0xb8845eb4>
     # /tmp/d20141008-29654-5a0ic2/spec.rb:25:in `block (2 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (3 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (2 levels) in <top (required)>'
  7) format_string works with already trimmed strings with greater width padding
     Failure/Error: expect(format_string('chunky   bacon!! ', 20)).to eq '   CHUNKY BACON!!   '
     NoMethodError:
       undefined method `format_string' for #<RSpec::Core::ExampleGroup::Nested_1:0xb8844f78>
     # /tmp/d20141008-29654-5a0ic2/spec.rb:30:in `block (2 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (3 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (2 levels) in <top (required)>'
Finished in 0.00528 seconds
7 examples, 7 failures
Failed examples:
rspec /tmp/d20141008-29654-5a0ic2/spec.rb:2 # format_string does not change already formatted strings
rspec /tmp/d20141008-29654-5a0ic2/spec.rb:6 # format_string trims spaces
rspec /tmp/d20141008-29654-5a0ic2/spec.rb:10 # format_string does not attempt to center the string if the width is less than the one after processing
rspec /tmp/d20141008-29654-5a0ic2/spec.rb:14 # format_string does not attempt to center the string if the width is zero
rspec /tmp/d20141008-29654-5a0ic2/spec.rb:18 # format_string appends odd intervals at the end of the string when centering
rspec /tmp/d20141008-29654-5a0ic2/spec.rb:24 # format_string centers strings properly when the length difference is even
rspec /tmp/d20141008-29654-5a0ic2/spec.rb:29 # format_string works with already trimmed strings with greater width padding
RUN FOREST RUN!!  
DO YOUR HOMEWORK NOW
BACON 
BACON!!
FBACON!!
FDO YOUR CHALLENGE NOW
FHASTA LA VISTA, BABY!
FODD 
FTRY HARDER!  
F   CHUNKY BACON!!   
F
Failures:
  1) format_string does not change already formatted strings
     Failure/Error: expect(format_string('BACON!!', 5)).to eq 'BACON!!'
       
       expected: "BACON!!"
            got: nil
       
       (compared using ==)
     # /tmp/d20141008-29654-g44qrv/spec.rb:3:in `block (2 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (3 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (2 levels) in <top (required)>'
  2) format_string trims spaces
     Failure/Error: expect(format_string('     BACON!!  ', 0)).to eq 'BACON!!'
       
       expected: "BACON!!"
            got: nil
       
       (compared using ==)
     # /tmp/d20141008-29654-g44qrv/spec.rb:7:in `block (2 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (3 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (2 levels) in <top (required)>'
  3) format_string does not attempt to center the string if the width is less than the one after processing
     Failure/Error: expect(format_string('  do YouR   challengE   NoW    ', 10)).to eq 'DO YOUR CHALLENGE NOW'
       
       expected: "DO YOUR CHALLENGE NOW"
            got: nil
       
       (compared using ==)
     # /tmp/d20141008-29654-g44qrv/spec.rb:11:in `block (2 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (3 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (2 levels) in <top (required)>'
  4) format_string does not attempt to center the string if the width is zero
     Failure/Error: expect(format_string(' HAstA    LA vista,     bAbY!      ', 0)).to eq 'HASTA LA VISTA, BABY!'
       
       expected: "HASTA LA VISTA, BABY!"
            got: nil
       
       (compared using ==)
     # /tmp/d20141008-29654-g44qrv/spec.rb:15:in `block (2 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (3 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (2 levels) in <top (required)>'
  5) format_string appends odd intervals at the end of the string when centering
     Failure/Error: expect(format_string('odd', 4)).to eq 'ODD '
       
       expected: "ODD "
            got: nil
       
       (compared using ==)
     # /tmp/d20141008-29654-g44qrv/spec.rb:19:in `block (2 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (3 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (2 levels) in <top (required)>'
  6) format_string centers strings properly when the length difference is even
     Failure/Error: expect(format_string('try harder!', 13)).to eq ' TRY HARDER! '
       
       expected: " TRY HARDER! "
            got: nil
       
       (compared using ==)
     # /tmp/d20141008-29654-g44qrv/spec.rb:25:in `block (2 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (3 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (2 levels) in <top (required)>'
  7) format_string works with already trimmed strings with greater width padding
     Failure/Error: expect(format_string('chunky   bacon!! ', 20)).to eq '   CHUNKY BACON!!   '
       
       expected: "   CHUNKY BACON!!   "
            got: nil
       
       (compared using ==)
     # /tmp/d20141008-29654-g44qrv/spec.rb:30:in `block (2 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (3 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (2 levels) in <top (required)>'
Finished in 0.00725 seconds
7 examples, 7 failures
Failed examples:
rspec /tmp/d20141008-29654-g44qrv/spec.rb:2 # format_string does not change already formatted strings
rspec /tmp/d20141008-29654-g44qrv/spec.rb:6 # format_string trims spaces
rspec /tmp/d20141008-29654-g44qrv/spec.rb:10 # format_string does not attempt to center the string if the width is less than the one after processing
rspec /tmp/d20141008-29654-g44qrv/spec.rb:14 # format_string does not attempt to center the string if the width is zero
rspec /tmp/d20141008-29654-g44qrv/spec.rb:18 # format_string appends odd intervals at the end of the string when centering
rspec /tmp/d20141008-29654-g44qrv/spec.rb:24 # format_string centers strings properly when the length difference is even
rspec /tmp/d20141008-29654-g44qrv/spec.rb:29 # format_string works with already trimmed strings with greater width padding
....... Finished in 0.007 seconds 7 examples, 0 failures
FFFFFF.
Failures:
  1) format_string does not change already formatted strings
     Failure/Error: expect(format_string('BACON!!', 5)).to eq 'BACON!!'
       
       expected: "BACON!!"
            got: "BACON!! "
       
       (compared using ==)
     # /tmp/d20141008-29654-1kfj62a/spec.rb:3:in `block (2 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (3 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (2 levels) in <top (required)>'
  2) format_string trims spaces
     Failure/Error: expect(format_string('     BACON!!  ', 0)).to eq 'BACON!!'
       
       expected: "BACON!!"
            got: "BACON!! "
       
       (compared using ==)
     # /tmp/d20141008-29654-1kfj62a/spec.rb:7:in `block (2 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (3 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (2 levels) in <top (required)>'
  3) format_string does not attempt to center the string if the width is less than the one after processing
     Failure/Error: expect(format_string('  do YouR   challengE   NoW    ', 10)).to eq 'DO YOUR CHALLENGE NOW'
       
       expected: "DO YOUR CHALLENGE NOW"
            got: "DO YOUR CHALLENGE NOW "
       
       (compared using ==)
     # /tmp/d20141008-29654-1kfj62a/spec.rb:11:in `block (2 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (3 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (2 levels) in <top (required)>'
  4) format_string does not attempt to center the string if the width is zero
     Failure/Error: expect(format_string(' HAstA    LA vista,     bAbY!      ', 0)).to eq 'HASTA LA VISTA, BABY!'
       
       expected: "HASTA LA VISTA, BABY!"
            got: "HASTA LA VISTA, BABY! "
       
       (compared using ==)
     # /tmp/d20141008-29654-1kfj62a/spec.rb:15:in `block (2 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (3 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (2 levels) in <top (required)>'
  5) format_string appends odd intervals at the end of the string when centering
     Failure/Error: expect(format_string('odds', 7)).to eq ' ODDS  '
       
       expected: " ODDS  "
            got: " ODDS "
       
       (compared using ==)
     # /tmp/d20141008-29654-1kfj62a/spec.rb:20:in `block (2 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (3 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (2 levels) in <top (required)>'
  6) format_string centers strings properly when the length difference is even
     Failure/Error: expect(format_string('try harder!', 13)).to eq ' TRY HARDER! '
       
       expected: " TRY HARDER! "
            got: " TRY HARDER!  "
       
       (compared using ==)
     # /tmp/d20141008-29654-1kfj62a/spec.rb:25:in `block (2 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (3 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (2 levels) in <top (required)>'
Finished in 0.00702 seconds
7 examples, 6 failures
Failed examples:
rspec /tmp/d20141008-29654-1kfj62a/spec.rb:2 # format_string does not change already formatted strings
rspec /tmp/d20141008-29654-1kfj62a/spec.rb:6 # format_string trims spaces
rspec /tmp/d20141008-29654-1kfj62a/spec.rb:10 # format_string does not attempt to center the string if the width is less than the one after processing
rspec /tmp/d20141008-29654-1kfj62a/spec.rb:14 # format_string does not attempt to center the string if the width is zero
rspec /tmp/d20141008-29654-1kfj62a/spec.rb:18 # format_string appends odd intervals at the end of the string when centering
rspec /tmp/d20141008-29654-1kfj62a/spec.rb:24 # format_string centers strings properly when the length difference is even
....... Finished in 0.00642 seconds 7 examples, 0 failures
FFFF.F.
Failures:
  1) format_string does not change already formatted strings
     Failure/Error: expect(format_string('BACON!!', 5)).to eq 'BACON!!'
       
       expected: "BACON!!"
            got: "BACON!! "
       
       (compared using ==)
     # /tmp/d20141008-29654-1vighvm/spec.rb:3:in `block (2 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (3 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (2 levels) in <top (required)>'
  2) format_string trims spaces
     Failure/Error: expect(format_string('     BACON!!  ', 0)).to eq 'BACON!!'
       
       expected: "BACON!!"
            got: "BACON!! "
       
       (compared using ==)
     # /tmp/d20141008-29654-1vighvm/spec.rb:7:in `block (2 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (3 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (2 levels) in <top (required)>'
  3) format_string does not attempt to center the string if the width is less than the one after processing
     Failure/Error: expect(format_string('  do YouR   challengE   NoW    ', 10)).to eq 'DO YOUR CHALLENGE NOW'
       
       expected: "DO YOUR CHALLENGE NOW"
            got: "DO YOUR CHALLENGE NOW "
       
       (compared using ==)
     # /tmp/d20141008-29654-1vighvm/spec.rb:11:in `block (2 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (3 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (2 levels) in <top (required)>'
  4) format_string does not attempt to center the string if the width is zero
     Failure/Error: expect(format_string(' HAstA    LA vista,     bAbY!      ', 0)).to eq 'HASTA LA VISTA, BABY!'
       
       expected: "HASTA LA VISTA, BABY!"
            got: "HASTA LA VISTA, BABY! "
       
       (compared using ==)
     # /tmp/d20141008-29654-1vighvm/spec.rb:15:in `block (2 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (3 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (2 levels) in <top (required)>'
  5) format_string centers strings properly when the length difference is even
     Failure/Error: expect(format_string('try harder!', 13)).to eq ' TRY HARDER! '
       
       expected: " TRY HARDER! "
            got: "TRY HARDER!  "
       
       (compared using ==)
     # /tmp/d20141008-29654-1vighvm/spec.rb:25:in `block (2 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (3 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (2 levels) in <top (required)>'
Finished in 0.00673 seconds
7 examples, 5 failures
Failed examples:
rspec /tmp/d20141008-29654-1vighvm/spec.rb:2 # format_string does not change already formatted strings
rspec /tmp/d20141008-29654-1vighvm/spec.rb:6 # format_string trims spaces
rspec /tmp/d20141008-29654-1vighvm/spec.rb:10 # format_string does not attempt to center the string if the width is less than the one after processing
rspec /tmp/d20141008-29654-1vighvm/spec.rb:14 # format_string does not attempt to center the string if the width is zero
rspec /tmp/d20141008-29654-1vighvm/spec.rb:24 # format_string centers strings properly when the length difference is even
RUN FOREST RUN!! DO YOUR HOMEWORK NOW BACON ....... Finished in 0.00627 seconds 7 examples, 0 failures
....... Finished in 0.00877 seconds 7 examples, 0 failures
....... Finished in 0.00641 seconds 7 examples, 0 failures
....... Finished in 0.00643 seconds 7 examples, 0 failures
....... Finished in 0.00624 seconds 7 examples, 0 failures
FFFF.F.
Failures:
  1) format_string does not change already formatted strings
     Failure/Error: expect(format_string('BACON!!', 5)).to eq 'BACON!!'
       
       expected: "BACON!!"
            got: "BACON!! "
       
       (compared using ==)
     # /tmp/d20141008-29654-krkmks/spec.rb:3:in `block (2 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (3 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (2 levels) in <top (required)>'
  2) format_string trims spaces
     Failure/Error: expect(format_string('     BACON!!  ', 0)).to eq 'BACON!!'
       
       expected: "BACON!!"
            got: "BACON!! "
       
       (compared using ==)
     # /tmp/d20141008-29654-krkmks/spec.rb:7:in `block (2 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (3 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (2 levels) in <top (required)>'
  3) format_string does not attempt to center the string if the width is less than the one after processing
     Failure/Error: expect(format_string('  do YouR   challengE   NoW    ', 10)).to eq 'DO YOUR CHALLENGE NOW'
       
       expected: "DO YOUR CHALLENGE NOW"
            got: "DO YOUR CHALLENGE NOW "
       
       (compared using ==)
     # /tmp/d20141008-29654-krkmks/spec.rb:11:in `block (2 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (3 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (2 levels) in <top (required)>'
  4) format_string does not attempt to center the string if the width is zero
     Failure/Error: expect(format_string(' HAstA    LA vista,     bAbY!      ', 0)).to eq 'HASTA LA VISTA, BABY!'
       
       expected: "HASTA LA VISTA, BABY!"
            got: "HASTA LA VISTA, BABY! "
       
       (compared using ==)
     # /tmp/d20141008-29654-krkmks/spec.rb:15:in `block (2 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (3 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (2 levels) in <top (required)>'
  5) format_string centers strings properly when the length difference is even
     Failure/Error: expect(format_string('try harder!', 13)).to eq ' TRY HARDER! '
       
       expected: " TRY HARDER! "
            got: "TRY HARDER! "
       
       (compared using ==)
     # /tmp/d20141008-29654-krkmks/spec.rb:25:in `block (2 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (3 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (2 levels) in <top (required)>'
Finished in 0.00873 seconds
7 examples, 5 failures
Failed examples:
rspec /tmp/d20141008-29654-krkmks/spec.rb:2 # format_string does not change already formatted strings
rspec /tmp/d20141008-29654-krkmks/spec.rb:6 # format_string trims spaces
rspec /tmp/d20141008-29654-krkmks/spec.rb:10 # format_string does not attempt to center the string if the width is less than the one after processing
rspec /tmp/d20141008-29654-krkmks/spec.rb:14 # format_string does not attempt to center the string if the width is zero
rspec /tmp/d20141008-29654-krkmks/spec.rb:24 # format_string centers strings properly when the length difference is even
....... Finished in 0.00623 seconds 7 examples, 0 failures
....... Finished in 0.00638 seconds 7 examples, 0 failures
.FFFFFF
Failures:
  1) format_string trims spaces
     Failure/Error: expect(format_string('     BACON!!  ', 0)).to eq 'BACON!!'
       
       expected: "BACON!!"
            got: "     BACON!!  "
       
       (compared using ==)
     # /tmp/d20141008-29654-1q1z0wh/spec.rb:7:in `block (2 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (3 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (2 levels) in <top (required)>'
  2) format_string does not attempt to center the string if the width is less than the one after processing
     Failure/Error: expect(format_string('  do YouR   challengE   NoW    ', 10)).to eq 'DO YOUR CHALLENGE NOW'
       
       expected: "DO YOUR CHALLENGE NOW"
            got: "  do YouR   challengE   NoW    "
       
       (compared using ==)
     # /tmp/d20141008-29654-1q1z0wh/spec.rb:11:in `block (2 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (3 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (2 levels) in <top (required)>'
  3) format_string does not attempt to center the string if the width is zero
     Failure/Error: expect(format_string(' HAstA    LA vista,     bAbY!      ', 0)).to eq 'HASTA LA VISTA, BABY!'
       
       expected: "HASTA LA VISTA, BABY!"
            got: " HAstA    LA vista,     bAbY!      "
       
       (compared using ==)
     # /tmp/d20141008-29654-1q1z0wh/spec.rb:15:in `block (2 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (3 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (2 levels) in <top (required)>'
  4) format_string appends odd intervals at the end of the string when centering
     Failure/Error: expect(format_string('odd', 4)).to eq 'ODD '
       
       expected: "ODD "
            got: "odd "
       
       (compared using ==)
     # /tmp/d20141008-29654-1q1z0wh/spec.rb:19:in `block (2 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (3 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (2 levels) in <top (required)>'
  5) format_string centers strings properly when the length difference is even
     Failure/Error: expect(format_string('try harder!', 13)).to eq ' TRY HARDER! '
       
       expected: " TRY HARDER! "
            got: " try harder! "
       
       (compared using ==)
     # /tmp/d20141008-29654-1q1z0wh/spec.rb:25:in `block (2 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (3 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (2 levels) in <top (required)>'
  6) format_string works with already trimmed strings with greater width padding
     Failure/Error: expect(format_string('chunky   bacon!! ', 20)).to eq '   CHUNKY BACON!!   '
       
       expected: "   CHUNKY BACON!!   "
            got: " chunky   bacon!!   "
       
       (compared using ==)
     # /tmp/d20141008-29654-1q1z0wh/spec.rb:30:in `block (2 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (3 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (2 levels) in <top (required)>'
Finished in 0.00689 seconds
7 examples, 6 failures
Failed examples:
rspec /tmp/d20141008-29654-1q1z0wh/spec.rb:6 # format_string trims spaces
rspec /tmp/d20141008-29654-1q1z0wh/spec.rb:10 # format_string does not attempt to center the string if the width is less than the one after processing
rspec /tmp/d20141008-29654-1q1z0wh/spec.rb:14 # format_string does not attempt to center the string if the width is zero
rspec /tmp/d20141008-29654-1q1z0wh/spec.rb:18 # format_string appends odd intervals at the end of the string when centering
rspec /tmp/d20141008-29654-1q1z0wh/spec.rb:24 # format_string centers strings properly when the length difference is even
rspec /tmp/d20141008-29654-1q1z0wh/spec.rb:29 # format_string works with already trimmed strings with greater width padding
....... Finished in 0.00633 seconds 7 examples, 0 failures
FFF.FFF
Failures:
  1) format_string does not change already formatted strings
     Failure/Error: expect(format_string('BACON!!', 5)).to eq 'BACON!!'
       
       expected: "BACON!!"
            got: "BACON!"
       
       (compared using ==)
     # /tmp/d20141008-29654-1y780z2/spec.rb:3:in `block (2 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (3 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (2 levels) in <top (required)>'
  2) format_string trims spaces
     Failure/Error: expect(format_string('     BACON!!  ', 0)).to eq 'BACON!!'
       
       expected: "BACON!!"
            got: "BACON!"
       
       (compared using ==)
     # /tmp/d20141008-29654-1y780z2/spec.rb:7:in `block (2 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (3 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (2 levels) in <top (required)>'
  3) format_string does not attempt to center the string if the width is less than the one after processing
     Failure/Error: expect(format_string('  do YouR   challengE   NoW    ', 10)).to eq 'DO YOUR CHALLENGE NOW'
       
       expected: "DO YOUR CHALLENGE NOW"
            got: "DO YOUR CHALENGE NOW"
       
       (compared using ==)
     # /tmp/d20141008-29654-1y780z2/spec.rb:11:in `block (2 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (3 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (2 levels) in <top (required)>'
  4) format_string appends odd intervals at the end of the string when centering
     Failure/Error: expect(format_string('odd', 4)).to eq 'ODD '
       
       expected: "ODD "
            got: " OD "
       
       (compared using ==)
     # /tmp/d20141008-29654-1y780z2/spec.rb:19:in `block (2 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (3 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (2 levels) in <top (required)>'
  5) format_string centers strings properly when the length difference is even
     Failure/Error: expect(format_string('  Run  FOrest   run!!', 20)).to eq '  RUN FOREST RUN!!  '
       
       expected: "  RUN FOREST RUN!!  "
            got: "  RUN FOREST RUN!   "
       
       (compared using ==)
     # /tmp/d20141008-29654-1y780z2/spec.rb:26:in `block (2 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (3 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (2 levels) in <top (required)>'
  6) format_string works with already trimmed strings with greater width padding
     Failure/Error: expect(format_string('chunky   bacon!! ', 20)).to eq '   CHUNKY BACON!!   '
       
       expected: "   CHUNKY BACON!!   "
            got: "   CHUNKY BACON!    "
       
       (compared using ==)
     # /tmp/d20141008-29654-1y780z2/spec.rb:30:in `block (2 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (3 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (2 levels) in <top (required)>'
Finished in 0.00687 seconds
7 examples, 6 failures
Failed examples:
rspec /tmp/d20141008-29654-1y780z2/spec.rb:2 # format_string does not change already formatted strings
rspec /tmp/d20141008-29654-1y780z2/spec.rb:6 # format_string trims spaces
rspec /tmp/d20141008-29654-1y780z2/spec.rb:10 # format_string does not attempt to center the string if the width is less than the one after processing
rspec /tmp/d20141008-29654-1y780z2/spec.rb:18 # format_string appends odd intervals at the end of the string when centering
rspec /tmp/d20141008-29654-1y780z2/spec.rb:24 # format_string centers strings properly when the length difference is even
rspec /tmp/d20141008-29654-1y780z2/spec.rb:29 # format_string works with already trimmed strings with greater width padding
....... Finished in 0.00626 seconds 7 examples, 0 failures
....... Finished in 0.00638 seconds 7 examples, 0 failures
....... Finished in 0.00637 seconds 7 examples, 0 failures
....... Finished in 0.00678 seconds 7 examples, 0 failures
BACON ....... Finished in 0.0065 seconds 7 examples, 0 failures
....... Finished in 0.00641 seconds 7 examples, 0 failures
....... Finished in 0.00653 seconds 7 examples, 0 failures
....... Finished in 0.00632 seconds 7 examples, 0 failures
....... Finished in 0.01411 seconds 7 examples, 0 failures
....... Finished in 0.00809 seconds 7 examples, 0 failures
"BACON!!"
F"BACON!!"
F"DO YOUR CHALLENGE NOW"
F"HASTA LA VISTA, BABY!"
F"ODD "
F" TRY HARDER! "
F"   CHUNKY BACON!!   "
F
Failures:
  1) format_string does not change already formatted strings
     Failure/Error: expect(format_string('BACON!!', 5)).to eq 'BACON!!'
       
       expected: "BACON!!"
            got: nil
       
       (compared using ==)
     # /tmp/d20141008-29654-loo9qi/spec.rb:3:in `block (2 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (3 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (2 levels) in <top (required)>'
  2) format_string trims spaces
     Failure/Error: expect(format_string('     BACON!!  ', 0)).to eq 'BACON!!'
       
       expected: "BACON!!"
            got: nil
       
       (compared using ==)
     # /tmp/d20141008-29654-loo9qi/spec.rb:7:in `block (2 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (3 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (2 levels) in <top (required)>'
  3) format_string does not attempt to center the string if the width is less than the one after processing
     Failure/Error: expect(format_string('  do YouR   challengE   NoW    ', 10)).to eq 'DO YOUR CHALLENGE NOW'
       
       expected: "DO YOUR CHALLENGE NOW"
            got: nil
       
       (compared using ==)
     # /tmp/d20141008-29654-loo9qi/spec.rb:11:in `block (2 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (3 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (2 levels) in <top (required)>'
  4) format_string does not attempt to center the string if the width is zero
     Failure/Error: expect(format_string(' HAstA    LA vista,     bAbY!      ', 0)).to eq 'HASTA LA VISTA, BABY!'
       
       expected: "HASTA LA VISTA, BABY!"
            got: nil
       
       (compared using ==)
     # /tmp/d20141008-29654-loo9qi/spec.rb:15:in `block (2 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (3 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (2 levels) in <top (required)>'
  5) format_string appends odd intervals at the end of the string when centering
     Failure/Error: expect(format_string('odd', 4)).to eq 'ODD '
       
       expected: "ODD "
            got: nil
       
       (compared using ==)
     # /tmp/d20141008-29654-loo9qi/spec.rb:19:in `block (2 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (3 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (2 levels) in <top (required)>'
  6) format_string centers strings properly when the length difference is even
     Failure/Error: expect(format_string('try harder!', 13)).to eq ' TRY HARDER! '
       
       expected: " TRY HARDER! "
            got: nil
       
       (compared using ==)
     # /tmp/d20141008-29654-loo9qi/spec.rb:25:in `block (2 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (3 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (2 levels) in <top (required)>'
  7) format_string works with already trimmed strings with greater width padding
     Failure/Error: expect(format_string('chunky   bacon!! ', 20)).to eq '   CHUNKY BACON!!   '
       
       expected: "   CHUNKY BACON!!   "
            got: nil
       
       (compared using ==)
     # /tmp/d20141008-29654-loo9qi/spec.rb:30:in `block (2 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (3 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (2 levels) in <top (required)>'
Finished in 0.01013 seconds
7 examples, 7 failures
Failed examples:
rspec /tmp/d20141008-29654-loo9qi/spec.rb:2 # format_string does not change already formatted strings
rspec /tmp/d20141008-29654-loo9qi/spec.rb:6 # format_string trims spaces
rspec /tmp/d20141008-29654-loo9qi/spec.rb:10 # format_string does not attempt to center the string if the width is less than the one after processing
rspec /tmp/d20141008-29654-loo9qi/spec.rb:14 # format_string does not attempt to center the string if the width is zero
rspec /tmp/d20141008-29654-loo9qi/spec.rb:18 # format_string appends odd intervals at the end of the string when centering
rspec /tmp/d20141008-29654-loo9qi/spec.rb:24 # format_string centers strings properly when the length difference is even
rspec /tmp/d20141008-29654-loo9qi/spec.rb:29 # format_string works with already trimmed strings with greater width padding
....... Finished in 0.00776 seconds 7 examples, 0 failures
....... Finished in 0.00814 seconds 7 examples, 0 failures
"BACON!!"
F"BACON!!"
F"DO YOUR CHALLENGE NOW"
F"HASTA LA VISTA, BABY!"
F"ODD "
F" TRY HARDER! "
F"   CHUNKY BACON!!   "
F
Failures:
  1) format_string does not change already formatted strings
     Failure/Error: expect(format_string('BACON!!', 5)).to eq 'BACON!!'
       
       expected: "BACON!!"
            got: nil
       
       (compared using ==)
     # /tmp/d20141008-29654-f583gk/spec.rb:3:in `block (2 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (3 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (2 levels) in <top (required)>'
  2) format_string trims spaces
     Failure/Error: expect(format_string('     BACON!!  ', 0)).to eq 'BACON!!'
       
       expected: "BACON!!"
            got: nil
       
       (compared using ==)
     # /tmp/d20141008-29654-f583gk/spec.rb:7:in `block (2 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (3 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (2 levels) in <top (required)>'
  3) format_string does not attempt to center the string if the width is less than the one after processing
     Failure/Error: expect(format_string('  do YouR   challengE   NoW    ', 10)).to eq 'DO YOUR CHALLENGE NOW'
       
       expected: "DO YOUR CHALLENGE NOW"
            got: nil
       
       (compared using ==)
     # /tmp/d20141008-29654-f583gk/spec.rb:11:in `block (2 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (3 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (2 levels) in <top (required)>'
  4) format_string does not attempt to center the string if the width is zero
     Failure/Error: expect(format_string(' HAstA    LA vista,     bAbY!      ', 0)).to eq 'HASTA LA VISTA, BABY!'
       
       expected: "HASTA LA VISTA, BABY!"
            got: nil
       
       (compared using ==)
     # /tmp/d20141008-29654-f583gk/spec.rb:15:in `block (2 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (3 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (2 levels) in <top (required)>'
  5) format_string appends odd intervals at the end of the string when centering
     Failure/Error: expect(format_string('odd', 4)).to eq 'ODD '
       
       expected: "ODD "
            got: nil
       
       (compared using ==)
     # /tmp/d20141008-29654-f583gk/spec.rb:19:in `block (2 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (3 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (2 levels) in <top (required)>'
  6) format_string centers strings properly when the length difference is even
     Failure/Error: expect(format_string('try harder!', 13)).to eq ' TRY HARDER! '
       
       expected: " TRY HARDER! "
            got: nil
       
       (compared using ==)
     # /tmp/d20141008-29654-f583gk/spec.rb:25:in `block (2 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (3 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (2 levels) in <top (required)>'
  7) format_string works with already trimmed strings with greater width padding
     Failure/Error: expect(format_string('chunky   bacon!! ', 20)).to eq '   CHUNKY BACON!!   '
       
       expected: "   CHUNKY BACON!!   "
            got: nil
       
       (compared using ==)
     # /tmp/d20141008-29654-f583gk/spec.rb:30:in `block (2 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (3 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (2 levels) in <top (required)>'
Finished in 0.00726 seconds
7 examples, 7 failures
Failed examples:
rspec /tmp/d20141008-29654-f583gk/spec.rb:2 # format_string does not change already formatted strings
rspec /tmp/d20141008-29654-f583gk/spec.rb:6 # format_string trims spaces
rspec /tmp/d20141008-29654-f583gk/spec.rb:10 # format_string does not attempt to center the string if the width is less than the one after processing
rspec /tmp/d20141008-29654-f583gk/spec.rb:14 # format_string does not attempt to center the string if the width is zero
rspec /tmp/d20141008-29654-f583gk/spec.rb:18 # format_string appends odd intervals at the end of the string when centering
rspec /tmp/d20141008-29654-f583gk/spec.rb:24 # format_string centers strings properly when the length difference is even
rspec /tmp/d20141008-29654-f583gk/spec.rb:29 # format_string works with already trimmed strings with greater width padding
FFFFFFF
Failures:
  1) format_string does not change already formatted strings
     Failure/Error: expect(format_string('BACON!!', 5)).to eq 'BACON!!'
     NoMethodError:
       undefined method `format_string' for #<RSpec::Core::ExampleGroup::Nested_1:0xb9ae1a50>
     # /tmp/d20141008-29654-wrdrsv/spec.rb:3:in `block (2 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (3 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (2 levels) in <top (required)>'
  2) format_string trims spaces
     Failure/Error: expect(format_string('     BACON!!  ', 0)).to eq 'BACON!!'
     NoMethodError:
       undefined method `format_string' for #<RSpec::Core::ExampleGroup::Nested_1:0xb9ae06dc>
     # /tmp/d20141008-29654-wrdrsv/spec.rb:7:in `block (2 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (3 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (2 levels) in <top (required)>'
  3) format_string does not attempt to center the string if the width is less than the one after processing
     Failure/Error: expect(format_string('  do YouR   challengE   NoW    ', 10)).to eq 'DO YOUR CHALLENGE NOW'
     NoMethodError:
       undefined method `format_string' for #<RSpec::Core::ExampleGroup::Nested_1:0xb9ad7488>
     # /tmp/d20141008-29654-wrdrsv/spec.rb:11:in `block (2 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (3 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (2 levels) in <top (required)>'
  4) format_string does not attempt to center the string if the width is zero
     Failure/Error: expect(format_string(' HAstA    LA vista,     bAbY!      ', 0)).to eq 'HASTA LA VISTA, BABY!'
     NoMethodError:
       undefined method `format_string' for #<RSpec::Core::ExampleGroup::Nested_1:0xb9ad4968>
     # /tmp/d20141008-29654-wrdrsv/spec.rb:15:in `block (2 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (3 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (2 levels) in <top (required)>'
  5) format_string appends odd intervals at the end of the string when centering
     Failure/Error: expect(format_string('odd', 4)).to eq 'ODD '
     NoMethodError:
       undefined method `format_string' for #<RSpec::Core::ExampleGroup::Nested_1:0xb9ad3a40>
     # /tmp/d20141008-29654-wrdrsv/spec.rb:19:in `block (2 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (3 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (2 levels) in <top (required)>'
  6) format_string centers strings properly when the length difference is even
     Failure/Error: expect(format_string('try harder!', 13)).to eq ' TRY HARDER! '
     NoMethodError:
       undefined method `format_string' for #<RSpec::Core::ExampleGroup::Nested_1:0xb9ad2960>
     # /tmp/d20141008-29654-wrdrsv/spec.rb:25:in `block (2 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (3 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (2 levels) in <top (required)>'
  7) format_string works with already trimmed strings with greater width padding
     Failure/Error: expect(format_string('chunky   bacon!! ', 20)).to eq '   CHUNKY BACON!!   '
     NoMethodError:
       undefined method `format_string' for #<RSpec::Core::ExampleGroup::Nested_1:0xb9ad1920>
     # /tmp/d20141008-29654-wrdrsv/spec.rb:30:in `block (2 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (3 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (2 levels) in <top (required)>'
Finished in 0.00526 seconds
7 examples, 7 failures
Failed examples:
rspec /tmp/d20141008-29654-wrdrsv/spec.rb:2 # format_string does not change already formatted strings
rspec /tmp/d20141008-29654-wrdrsv/spec.rb:6 # format_string trims spaces
rspec /tmp/d20141008-29654-wrdrsv/spec.rb:10 # format_string does not attempt to center the string if the width is less than the one after processing
rspec /tmp/d20141008-29654-wrdrsv/spec.rb:14 # format_string does not attempt to center the string if the width is zero
rspec /tmp/d20141008-29654-wrdrsv/spec.rb:18 # format_string appends odd intervals at the end of the string when centering
rspec /tmp/d20141008-29654-wrdrsv/spec.rb:24 # format_string centers strings properly when the length difference is even
rspec /tmp/d20141008-29654-wrdrsv/spec.rb:29 # format_string works with already trimmed strings with greater width padding
BACON!!
F BACON!! 
F DO YOUR CHALLENGE NOW 
FHASTA LA VISTA, BABY! 
FODD 
F TRY HARDER! 
F   CHUNKY BACON!!   
F
Failures:
  1) format_string does not change already formatted strings
     Failure/Error: expect(format_string('BACON!!', 5)).to eq 'BACON!!'
       
       expected: "BACON!!"
            got: nil
       
       (compared using ==)
     # /tmp/d20141008-29654-1q6yqiv/spec.rb:3:in `block (2 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (3 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (2 levels) in <top (required)>'
  2) format_string trims spaces
     Failure/Error: expect(format_string('     BACON!!  ', 0)).to eq 'BACON!!'
       
       expected: "BACON!!"
            got: nil
       
       (compared using ==)
     # /tmp/d20141008-29654-1q6yqiv/spec.rb:7:in `block (2 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (3 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (2 levels) in <top (required)>'
  3) format_string does not attempt to center the string if the width is less than the one after processing
     Failure/Error: expect(format_string('  do YouR   challengE   NoW    ', 10)).to eq 'DO YOUR CHALLENGE NOW'
       
       expected: "DO YOUR CHALLENGE NOW"
            got: nil
       
       (compared using ==)
     # /tmp/d20141008-29654-1q6yqiv/spec.rb:11:in `block (2 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (3 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (2 levels) in <top (required)>'
  4) format_string does not attempt to center the string if the width is zero
     Failure/Error: expect(format_string(' HAstA    LA vista,     bAbY!      ', 0)).to eq 'HASTA LA VISTA, BABY!'
       
       expected: "HASTA LA VISTA, BABY!"
            got: nil
       
       (compared using ==)
     # /tmp/d20141008-29654-1q6yqiv/spec.rb:15:in `block (2 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (3 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (2 levels) in <top (required)>'
  5) format_string appends odd intervals at the end of the string when centering
     Failure/Error: expect(format_string('odd', 4)).to eq 'ODD '
       
       expected: "ODD "
            got: nil
       
       (compared using ==)
     # /tmp/d20141008-29654-1q6yqiv/spec.rb:19:in `block (2 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (3 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (2 levels) in <top (required)>'
  6) format_string centers strings properly when the length difference is even
     Failure/Error: expect(format_string('try harder!', 13)).to eq ' TRY HARDER! '
       
       expected: " TRY HARDER! "
            got: nil
       
       (compared using ==)
     # /tmp/d20141008-29654-1q6yqiv/spec.rb:25:in `block (2 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (3 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (2 levels) in <top (required)>'
  7) format_string works with already trimmed strings with greater width padding
     Failure/Error: expect(format_string('chunky   bacon!! ', 20)).to eq '   CHUNKY BACON!!   '
       
       expected: "   CHUNKY BACON!!   "
            got: nil
       
       (compared using ==)
     # /tmp/d20141008-29654-1q6yqiv/spec.rb:30:in `block (2 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (3 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (2 levels) in <top (required)>'
Finished in 0.00753 seconds
7 examples, 7 failures
Failed examples:
rspec /tmp/d20141008-29654-1q6yqiv/spec.rb:2 # format_string does not change already formatted strings
rspec /tmp/d20141008-29654-1q6yqiv/spec.rb:6 # format_string trims spaces
rspec /tmp/d20141008-29654-1q6yqiv/spec.rb:10 # format_string does not attempt to center the string if the width is less than the one after processing
rspec /tmp/d20141008-29654-1q6yqiv/spec.rb:14 # format_string does not attempt to center the string if the width is zero
rspec /tmp/d20141008-29654-1q6yqiv/spec.rb:18 # format_string appends odd intervals at the end of the string when centering
rspec /tmp/d20141008-29654-1q6yqiv/spec.rb:24 # format_string centers strings properly when the length difference is even
rspec /tmp/d20141008-29654-1q6yqiv/spec.rb:29 # format_string works with already trimmed strings with greater width padding
BACON!!
FBACON!!
FDO YOUR CHALLENGE NOW
FHASTA LA VISTA, BABY!
FODD 
F TRY HARDER! 
F   CHUNKY BACON!!   
F
Failures:
  1) format_string does not change already formatted strings
     Failure/Error: expect(format_string('BACON!!', 5)).to eq 'BACON!!'
       
       expected: "BACON!!"
            got: nil
       
       (compared using ==)
     # /tmp/d20141008-29654-15obvv8/spec.rb:3:in `block (2 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (3 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (2 levels) in <top (required)>'
  2) format_string trims spaces
     Failure/Error: expect(format_string('     BACON!!  ', 0)).to eq 'BACON!!'
       
       expected: "BACON!!"
            got: nil
       
       (compared using ==)
     # /tmp/d20141008-29654-15obvv8/spec.rb:7:in `block (2 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (3 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (2 levels) in <top (required)>'
  3) format_string does not attempt to center the string if the width is less than the one after processing
     Failure/Error: expect(format_string('  do YouR   challengE   NoW    ', 10)).to eq 'DO YOUR CHALLENGE NOW'
       
       expected: "DO YOUR CHALLENGE NOW"
            got: nil
       
       (compared using ==)
     # /tmp/d20141008-29654-15obvv8/spec.rb:11:in `block (2 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (3 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (2 levels) in <top (required)>'
  4) format_string does not attempt to center the string if the width is zero
     Failure/Error: expect(format_string(' HAstA    LA vista,     bAbY!      ', 0)).to eq 'HASTA LA VISTA, BABY!'
       
       expected: "HASTA LA VISTA, BABY!"
            got: nil
       
       (compared using ==)
     # /tmp/d20141008-29654-15obvv8/spec.rb:15:in `block (2 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (3 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (2 levels) in <top (required)>'
  5) format_string appends odd intervals at the end of the string when centering
     Failure/Error: expect(format_string('odd', 4)).to eq 'ODD '
       
       expected: "ODD "
            got: nil
       
       (compared using ==)
     # /tmp/d20141008-29654-15obvv8/spec.rb:19:in `block (2 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (3 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (2 levels) in <top (required)>'
  6) format_string centers strings properly when the length difference is even
     Failure/Error: expect(format_string('try harder!', 13)).to eq ' TRY HARDER! '
       
       expected: " TRY HARDER! "
            got: nil
       
       (compared using ==)
     # /tmp/d20141008-29654-15obvv8/spec.rb:25:in `block (2 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (3 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (2 levels) in <top (required)>'
  7) format_string works with already trimmed strings with greater width padding
     Failure/Error: expect(format_string('chunky   bacon!! ', 20)).to eq '   CHUNKY BACON!!   '
       
       expected: "   CHUNKY BACON!!   "
            got: nil
       
       (compared using ==)
     # /tmp/d20141008-29654-15obvv8/spec.rb:30:in `block (2 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (3 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (2 levels) in <top (required)>'
Finished in 0.00913 seconds
7 examples, 7 failures
Failed examples:
rspec /tmp/d20141008-29654-15obvv8/spec.rb:2 # format_string does not change already formatted strings
rspec /tmp/d20141008-29654-15obvv8/spec.rb:6 # format_string trims spaces
rspec /tmp/d20141008-29654-15obvv8/spec.rb:10 # format_string does not attempt to center the string if the width is less than the one after processing
rspec /tmp/d20141008-29654-15obvv8/spec.rb:14 # format_string does not attempt to center the string if the width is zero
rspec /tmp/d20141008-29654-15obvv8/spec.rb:18 # format_string appends odd intervals at the end of the string when centering
rspec /tmp/d20141008-29654-15obvv8/spec.rb:24 # format_string centers strings properly when the length difference is even
rspec /tmp/d20141008-29654-15obvv8/spec.rb:29 # format_string works with already trimmed strings with greater width padding
....... Finished in 0.00625 seconds 7 examples, 0 failures
.FFFFFF
Failures:
  1) format_string trims spaces
     Failure/Error: expect(format_string('     BACON!!  ', 0)).to eq 'BACON!!'
       
       expected: "BACON!!"
            got: "     BACON!!  "
       
       (compared using ==)
     # /tmp/d20141008-29654-petjq9/spec.rb:7:in `block (2 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (3 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (2 levels) in <top (required)>'
  2) format_string does not attempt to center the string if the width is less than the one after processing
     Failure/Error: expect(format_string('  do YouR   challengE   NoW    ', 10)).to eq 'DO YOUR CHALLENGE NOW'
       
       expected: "DO YOUR CHALLENGE NOW"
            got: "  do YouR   challengE   NoW    "
       
       (compared using ==)
     # /tmp/d20141008-29654-petjq9/spec.rb:11:in `block (2 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (3 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (2 levels) in <top (required)>'
  3) format_string does not attempt to center the string if the width is zero
     Failure/Error: expect(format_string(' HAstA    LA vista,     bAbY!      ', 0)).to eq 'HASTA LA VISTA, BABY!'
       
       expected: "HASTA LA VISTA, BABY!"
            got: " HAstA    LA vista,     bAbY!      "
       
       (compared using ==)
     # /tmp/d20141008-29654-petjq9/spec.rb:15:in `block (2 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (3 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (2 levels) in <top (required)>'
  4) format_string appends odd intervals at the end of the string when centering
     Failure/Error: expect(format_string('odd', 4)).to eq 'ODD '
     ArgumentError:
       wrong number of arguments (0 for 1)
     # /tmp/d20141008-29654-petjq9/solution.rb:7:in `is_a?'
     # /tmp/d20141008-29654-petjq9/solution.rb:7:in `format_string'
     # /tmp/d20141008-29654-petjq9/spec.rb:19:in `block (2 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (3 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (2 levels) in <top (required)>'
  5) format_string centers strings properly when the length difference is even
     Failure/Error: expect(format_string('try harder!', 13)).to eq ' TRY HARDER! '
     ArgumentError:
       wrong number of arguments (0 for 1)
     # /tmp/d20141008-29654-petjq9/solution.rb:7:in `is_a?'
     # /tmp/d20141008-29654-petjq9/solution.rb:7:in `format_string'
     # /tmp/d20141008-29654-petjq9/spec.rb:25:in `block (2 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (3 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (2 levels) in <top (required)>'
  6) format_string works with already trimmed strings with greater width padding
     Failure/Error: expect(format_string('chunky   bacon!! ', 20)).to eq '   CHUNKY BACON!!   '
     ArgumentError:
       wrong number of arguments (0 for 1)
     # /tmp/d20141008-29654-petjq9/solution.rb:7:in `is_a?'
     # /tmp/d20141008-29654-petjq9/solution.rb:7:in `format_string'
     # /tmp/d20141008-29654-petjq9/spec.rb:30:in `block (2 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (3 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (2 levels) in <top (required)>'
Finished in 0.00681 seconds
7 examples, 6 failures
Failed examples:
rspec /tmp/d20141008-29654-petjq9/spec.rb:6 # format_string trims spaces
rspec /tmp/d20141008-29654-petjq9/spec.rb:10 # format_string does not attempt to center the string if the width is less than the one after processing
rspec /tmp/d20141008-29654-petjq9/spec.rb:14 # format_string does not attempt to center the string if the width is zero
rspec /tmp/d20141008-29654-petjq9/spec.rb:18 # format_string appends odd intervals at the end of the string when centering
rspec /tmp/d20141008-29654-petjq9/spec.rb:24 # format_string centers strings properly when the length difference is even
rspec /tmp/d20141008-29654-petjq9/spec.rb:29 # format_string works with already trimmed strings with greater width padding
FFFF.FF
Failures:
  1) format_string does not change already formatted strings
     Failure/Error: expect(format_string('BACON!!', 5)).to eq 'BACON!!'
       
       expected: "BACON!!"
            got: "BACON!! "
       
       (compared using ==)
     # /tmp/d20141008-29654-6xolgl/spec.rb:3:in `block (2 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (3 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (2 levels) in <top (required)>'
  2) format_string trims spaces
     Failure/Error: expect(format_string('     BACON!!  ', 0)).to eq 'BACON!!'
       
       expected: "BACON!!"
            got: "BACON!! "
       
       (compared using ==)
     # /tmp/d20141008-29654-6xolgl/spec.rb:7:in `block (2 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (3 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (2 levels) in <top (required)>'
  3) format_string does not attempt to center the string if the width is less than the one after processing
     Failure/Error: expect(format_string('  do YouR   challengE   NoW    ', 10)).to eq 'DO YOUR CHALLENGE NOW'
       
       expected: "DO YOUR CHALLENGE NOW"
            got: "DO YOUR CHALLENGE NOW "
       
       (compared using ==)
     # /tmp/d20141008-29654-6xolgl/spec.rb:11:in `block (2 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (3 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (2 levels) in <top (required)>'
  4) format_string does not attempt to center the string if the width is zero
     Failure/Error: expect(format_string(' HAstA    LA vista,     bAbY!      ', 0)).to eq 'HASTA LA VISTA, BABY!'
       
       expected: "HASTA LA VISTA, BABY!"
            got: "HASTA LA VISTA, BABY! "
       
       (compared using ==)
     # /tmp/d20141008-29654-6xolgl/spec.rb:15:in `block (2 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (3 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (2 levels) in <top (required)>'
  5) format_string centers strings properly when the length difference is even
     Failure/Error: expect(format_string('try harder!', 13)).to eq ' TRY HARDER! '
       
       expected: " TRY HARDER! "
            got: "TRY HARDER!  "
       
       (compared using ==)
     # /tmp/d20141008-29654-6xolgl/spec.rb:25:in `block (2 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (3 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (2 levels) in <top (required)>'
  6) format_string works with already trimmed strings with greater width padding
     Failure/Error: expect(format_string('chunky   bacon!! ', 20)).to eq '   CHUNKY BACON!!   '
       
       expected: "   CHUNKY BACON!!   "
            got: "  CHUNKY BACON!!    "
       
       (compared using ==)
     # /tmp/d20141008-29654-6xolgl/spec.rb:30:in `block (2 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (3 levels) in <top (required)>'
     # ./lib/language/ruby/run_with_timeout.rb:5:in `block (2 levels) in <top (required)>'
Finished in 0.01531 seconds
7 examples, 6 failures
Failed examples:
rspec /tmp/d20141008-29654-6xolgl/spec.rb:2 # format_string does not change already formatted strings
rspec /tmp/d20141008-29654-6xolgl/spec.rb:6 # format_string trims spaces
rspec /tmp/d20141008-29654-6xolgl/spec.rb:10 # format_string does not attempt to center the string if the width is less than the one after processing
rspec /tmp/d20141008-29654-6xolgl/spec.rb:14 # format_string does not attempt to center the string if the width is zero
rspec /tmp/d20141008-29654-6xolgl/spec.rb:24 # format_string centers strings properly when the length difference is even
rspec /tmp/d20141008-29654-6xolgl/spec.rb:29 # format_string works with already trimmed strings with greater width padding
....... Finished in 0.19199 seconds 7 examples, 0 failures
....... Finished in 0.00705 seconds 7 examples, 0 failures