test/unit/utils_test.rb in hammer_cli-0.1.3 vs test/unit/utils_test.rb in hammer_cli-0.1.4

- old
+ new

@@ -49,9 +49,26 @@ "one-two-three".camelize.must_equal "One-two-three" end end + + describe "underscore" do + + it "converts camelized string to underscore" do + "OneTwoThree".underscore.must_equal "one_two_three" + end + + it "converts full class path name to underscore with slashes" do + "HammerCLI::SomeClass".underscore.must_equal "hammer_cli/some_class" + end + + it "converts dashes to underscores" do + "Re-Read".underscore.must_equal "re_read" + end + + end + describe "indent" do it "indents single line string" do "line one".indent_with(" ").must_equal " line one" end