test/test_ruby_ext.rb in serious-0.2.1 vs test/test_ruby_ext.rb in serious-0.2.2
- old
+ new
@@ -64,6 +64,16 @@
should("return '2nd' for 2.ordinal") { assert_equal '2nd', 2.ordinal}
should("return '3rd' for 3.ordinal") { assert_equal '3rd', 3.ordinal}
should("return '4th' for 4.ordinal") { assert_equal '4th', 4.ordinal}
should("return '31st' for 31.ordinal") { assert_equal '31st', 31.ordinal}
+ # ========================================================================
+ # Tests for slugize
+ # ========================================================================
+ should_slugize 'Foo Bar Baz', 'foo-bar-baz'
+ should_slugize ' Foo Bar_Baz ', 'foo-bar-baz'
+ should_slugize 'A Crazy Title with: Special Chars!', 'a-crazy-title-with-special-chars'
+ should_slugize 'We have 0123 numbers in here', 'we-have-0123-numbers-in-here'
+ should_slugize 'and we have !? more special char$', 'and-we-have-more-special-char'
+ should_slugize 'should--squeeze$', 'should-squeeze'
+
end