@@ -179,7 +179,7 @@ def mock_column(name, type, options = {})
179
179
context 'when header is "Schema Info"' do
180
180
context 'when the primary key is not specified' do
181
181
context 'when the columns are normal' do
182
- it 'should get schema info even if the primary key is not set ' do
182
+ it 'returns schema info' do
183
183
klass = mock_class ( :users ,
184
184
nil ,
185
185
[
@@ -202,7 +202,7 @@ def mock_column(name, type, options = {})
202
202
end
203
203
204
204
context 'when an enum column exists' do
205
- it 'should get schema info with enum type ' do
205
+ it 'returns schema info' do
206
206
klass = mock_class ( :users ,
207
207
nil ,
208
208
[
@@ -225,7 +225,7 @@ def mock_column(name, type, options = {})
225
225
end
226
226
227
227
context 'when unsigned columns exist' do
228
- it 'should get schema info with unsigned ' do
228
+ it 'returns schema info' do
229
229
klass = mock_class ( :users ,
230
230
nil ,
231
231
[
@@ -259,7 +259,7 @@ def mock_column(name, type, options = {})
259
259
context 'when the primary key is specified' do
260
260
context 'when the primary_key is :id' do
261
261
context 'when columns are normal' do
262
- it 'should get schema info with default options ' do
262
+ it 'returns schema info' do
263
263
klass = mock_class ( :users ,
264
264
:id ,
265
265
[
@@ -284,7 +284,7 @@ def mock_column(name, type, options = {})
284
284
end
285
285
286
286
context 'when columns have default values' do
287
- it 'should get schema info for integer and boolean with default' do
287
+ it 'returns schema info with default values ' do
288
288
klass = mock_class ( :users ,
289
289
:id ,
290
290
[
@@ -309,7 +309,7 @@ def mock_column(name, type, options = {})
309
309
end
310
310
311
311
context 'when an integer column using ActiveRecord::Enum exists' do
312
- it 'sets correct default value for integer column when ActiveRecord::Enum is used ' do
312
+ it 'returns schema info with default values ' do
313
313
klass = mock_class ( :users ,
314
314
:id ,
315
315
[
@@ -339,7 +339,7 @@ def mock_column(name, type, options = {})
339
339
context 'when indexes exist' do
340
340
context 'when option "show_indexes" is true' do
341
341
context 'when indexes are normal' do
342
- it 'should get indexes keys ' do
342
+ it 'returns schema info with index information ' do
343
343
klass = mock_class ( :users ,
344
344
:id ,
345
345
[
@@ -368,7 +368,7 @@ def mock_column(name, type, options = {})
368
368
end
369
369
370
370
context 'when one of indexes includes orderd index key' do
371
- it 'should get ordered indexes keys ' do
371
+ it 'returns schema info with index information ' do
372
372
klass = mock_class ( :users ,
373
373
:id ,
374
374
[
@@ -406,7 +406,7 @@ def mock_column(name, type, options = {})
406
406
end
407
407
408
408
context 'when one of indexes includes "where" clause' do
409
- it 'should get indexes keys with where clause ' do
409
+ it 'returns schema info with index information ' do
410
410
klass = mock_class ( :users ,
411
411
:id ,
412
412
[
@@ -444,7 +444,7 @@ def mock_column(name, type, options = {})
444
444
end
445
445
446
446
context 'when one of indexes includes "using" clause other than "btree"' do
447
- it 'should get indexes keys with using clause other than btree ' do
447
+ it 'returns schema info with index information ' do
448
448
klass = mock_class ( :users ,
449
449
:id ,
450
450
[
@@ -482,7 +482,7 @@ def mock_column(name, type, options = {})
482
482
end
483
483
484
484
context 'when index is not defined' do
485
- it 'should not crash getting indexes keys ' do
485
+ it 'returns schema info without index information ' do
486
486
klass = mock_class ( :users ,
487
487
:id ,
488
488
[
@@ -507,7 +507,7 @@ def mock_column(name, type, options = {})
507
507
508
508
context 'when option "simple_indexes" is true' do
509
509
context 'when one of indexes includes "orders" clause' do # TODO
510
- it 'should get simple indexes keys ' do
510
+ it 'returns schema info with index information ' do
511
511
klass = mock_class ( :users ,
512
512
:id ,
513
513
[
@@ -536,7 +536,7 @@ def mock_column(name, type, options = {})
536
536
end
537
537
538
538
context 'when one of indexes is in string form' do
539
- it 'should get simple indexes keys if one is in string form ' do
539
+ it 'returns schema info with index information ' do
540
540
klass = mock_class ( :users ,
541
541
:id ,
542
542
[
@@ -564,7 +564,7 @@ def mock_column(name, type, options = {})
564
564
context 'when foreign keys exist' do
565
565
context 'when option "show_foreign_keys" is specified' do
566
566
context 'when foreign_keys does not have option' do
567
- it 'should get foreign key info ' do
567
+ it 'returns schema info with foreign keys ' do
568
568
klass = mock_class ( :users ,
569
569
:id ,
570
570
[
@@ -605,7 +605,7 @@ def mock_column(name, type, options = {})
605
605
end
606
606
607
607
context 'when foreign_keys have option "on_delete" and "on_update"' do
608
- it 'should get foreign key info if on_delete/on_update options present ' do
608
+ it 'returns schema info with foreign keys ' do
609
609
klass = mock_class ( :users ,
610
610
:id ,
611
611
[
@@ -642,7 +642,7 @@ def mock_column(name, type, options = {})
642
642
end
643
643
644
644
context 'when option "show_foreign_keys" and "show_complete_foreign_keys" are specified' do
645
- it 'should get complete foreign key info ' do
645
+ it 'returns schema info with foreign keys ' do
646
646
klass = mock_class ( :users ,
647
647
:id ,
648
648
[
@@ -685,7 +685,7 @@ def mock_column(name, type, options = {})
685
685
end
686
686
687
687
context 'when the primary key is an array (using composite_primary_keys)' do
688
- it 'should get schema info even if the primary key is array, if using composite_primary_keys ' do
688
+ it 'returns schema info' do
689
689
klass = mock_class ( :users ,
690
690
[ :a_id , :b_id ] ,
691
691
[
@@ -715,7 +715,7 @@ def mock_column(name, type, options = {})
715
715
context 'when the primary key is specified' do
716
716
context 'when the primary_key is :id' do
717
717
context 'when option "format_rdoc" is true' do
718
- it 'should get schema info as RDoc' do
718
+ it 'returns schema info in RDoc format ' do
719
719
klass = mock_class ( :users ,
720
720
:id ,
721
721
[
@@ -741,7 +741,7 @@ def mock_column(name, type, options = {})
741
741
742
742
context 'when option "format_markdown" is true' do
743
743
context 'when other option is not specified' do
744
- it 'should get schema info as Markdown' do
744
+ it 'returns schema info in Markdown format ' do
745
745
klass = mock_class ( :users ,
746
746
:id ,
747
747
[
@@ -769,7 +769,7 @@ def mock_column(name, type, options = {})
769
769
770
770
context 'when option "show_indexes" is true' do
771
771
context 'when indexes are normal' do
772
- it 'should get schema info as Markdown with indexes ' do
772
+ it 'returns schema info with index information in Markdown format ' do
773
773
klass = mock_class ( :users ,
774
774
:id ,
775
775
[
@@ -808,7 +808,7 @@ def mock_column(name, type, options = {})
808
808
end
809
809
810
810
context 'when one of indexes includes "unique" clause' do
811
- it 'should get schema info as Markdown with unique indexes ' do
811
+ it 'returns schema info with index information in Markdown format ' do
812
812
klass = mock_class ( :users ,
813
813
:id ,
814
814
[
@@ -848,7 +848,7 @@ def mock_column(name, type, options = {})
848
848
end
849
849
850
850
context 'when one of indexes includes orderd index key' do
851
- it 'should get schema info as Markdown with ordered indexes ' do
851
+ it 'returns schema info with index information in Markdown format ' do
852
852
klass = mock_class ( :users ,
853
853
:id ,
854
854
[
@@ -888,7 +888,7 @@ def mock_column(name, type, options = {})
888
888
end
889
889
890
890
context 'when one of indexes includes "where" clause and "unique" clause' do
891
- it 'should get schema info as Markdown with indexes with WHERE clause ' do
891
+ it 'returns schema info with index information in Markdown format ' do
892
892
klass = mock_class ( :users ,
893
893
:id ,
894
894
[
@@ -929,7 +929,7 @@ def mock_column(name, type, options = {})
929
929
end
930
930
931
931
context 'when one of indexes includes "using" clause other than "btree"' do
932
- it 'should get schema info as Markdown with indexes with using clause other than btree ' do
932
+ it 'returns schema info with index information in Markdown format ' do
933
933
klass = mock_class ( :users ,
934
934
:id ,
935
935
[
@@ -971,7 +971,7 @@ def mock_column(name, type, options = {})
971
971
972
972
context 'when option "show_foreign_keys" is true' do
973
973
context 'when foreign_keys have option "on_delete" and "on_update"' do
974
- it 'should get schema info as Markdown with foreign keys ' do
974
+ it 'returns schema info with foreign_keys in Markdown format ' do
975
975
klass = mock_class ( :users ,
976
976
:id ,
977
977
[
0 commit comments