rubyworks/facets — pull request #47 by sereneiconoclast (2012-01-13 19:15:14+00:00)
Title: Fix for String.unindent()

I noticed that calling unindent() doesn't do the right thing:

irb(main):001:0> require 'facets/string/unindent'
=> true
irb(main):002:0> " two\n four\n".unindent
=> "two\n four\n"

Note that there is only one space before 'four'; there should be two. With this change, I get the correct output.

I ran the whole test suite and got no failures.

Incidentally, figuring out how to run the tests took a while. It would be nice if Facets include a README-testing.txt file explaining that the tests use a framework called 'Lemon', and where to find it. Google helped me figure that out. The documentation on how to run Lemon tests was also out of date - this page:

https://github.com/rubyworks/lemon/wiki/Running-Tests

...advises running the 'lemon' command, when the real command appears to be called 'lemonade'. And 'lemonade' didn't work for me anyway, producing a LoadError: "no such file to load -- test/cli". I had to run "rubytest -r lemon test" (the docs say "ruby-test" but that was also incorrect). I installed using 'sudo gem install lemon' and got lemon 0.9.0 and rubytest 0.3.1. Let me know if something's wrong with my setup.