File tree Expand file tree Collapse file tree 1 file changed +10
-18
lines changed Expand file tree Collapse file tree 1 file changed +10
-18
lines changed Original file line number Diff line number Diff line change 22require "titleizer"
33
44describe Titleizer do
5- it 'uppercases rvm' do
6- expect ( Titleizer . title_for_page ( 'rvm_is_a_thing' ) ) . to eq ( 'RVM Is A Thing' )
5+ it 'uppercases acronyms' do
6+ {
7+ 'rvm_is_a_thing' => 'RVM Is A Thing' ,
8+ 'ssh_into_all_the_things' => 'SSH Into All The Things' ,
9+ 'CRUD_with_scaffolding' => 'CRUD With Scaffolding' ,
10+ 'why_cant_my_vhs_play_this_dvd' => 'Why Cant My Vhs Play This DVD' ,
11+ 'whats_the_deal_with_html' => 'Whats The Deal With HTML'
12+ } . each do |initial , expected |
13+ expect ( Titleizer . title_for_page ( initial ) ) . to eq ( expected )
14+ end
715 end
816
917 it 'uppercases osx as OS X' do
1018 expect ( Titleizer . title_for_page ( 'osx_ive_never_heard_of_it' ) ) . to eq ( 'OS X Ive Never Heard Of It' )
1119 end
1220
13- it 'uppercases ssh' do
14- expect ( Titleizer . title_for_page ( 'ssh_into_all_the_things' ) ) . to eq ( 'SSH Into All The Things' )
15- end
16-
17- it 'upcases CRUD, even if it is already uppercase' do
18- expect ( Titleizer . title_for_page ( 'CRUD_with_scaffolding' ) ) . to eq ( 'CRUD With Scaffolding' )
19- end
20-
21- it 'uppercases dvd' do
22- expect ( Titleizer . title_for_page ( 'why_cant_my_vhs_play_this_dvd' ) ) . to eq ( 'Why Cant My Vhs Play This DVD' )
23- end
24-
25- it 'uppercases html' do
26- expect ( Titleizer . title_for_page ( 'whats_the_deal_with_html' ) ) . to eq ( 'Whats The Deal With HTML' )
27- end
28-
2921 it 'uppercases argv' do
3022 expect ( Titleizer . title_for_page ( 'argv' ) ) . to eq ( 'ARGV' )
3123 end
You can’t perform that action at this time.
0 commit comments