Sha256: fd2aeeba8f45b033a00d68add02769c29465660af8ab706529dd37da1bfd233a
Contents?: true
Size: 715 Bytes
Versions: 17
Compression:
Stored size: 715 Bytes
Contents
require_relative '../test_helper' module Generator class UnderscoreTest < MiniTest::Test using Underscore # at present, we're downcasing everything, including TLAs def test_mixed_case assert_equal 'A string with TLA'.underscore, 'a_string_with_tla' end def test_hyphenated_text assert_equal 'large distance in off-by-one strand'.underscore, 'large_distance_in_off_by_one_strand' end def test_question_mark assert_equal( 'Unreadable but correctly sized inputs return ?'.underscore, 'unreadable_but_correctly_sized_inputs_return_?' ) end def test_fixnum_underscore assert_equal '1_000_000', 1000000.underscore end end end
Version data entries
17 entries across 17 versions & 1 rubygems