guard-test 0.2.0 → 0.3.0.rc2
Sign up to get free protection for your applications and to get access to all the features.
- data/LICENSE +1 -1
- data/README.md +128 -0
- data/lib/guard/test.rb +47 -9
- data/lib/guard/test.rbc +761 -157
- data/lib/guard/test/formatter.rbc +215 -91
- data/lib/guard/test/inspector.rb +13 -12
- data/lib/guard/test/inspector.rbc +126 -77
- data/lib/guard/test/notifier.rb +17 -0
- data/lib/guard/test/notifier.rbc +435 -0
- data/lib/guard/test/result_helpers.rb +28 -0
- data/lib/guard/test/result_helpers.rbc +798 -0
- data/lib/guard/test/runner.rb +46 -30
- data/lib/guard/test/runner.rbc +812 -494
- data/lib/guard/test/runners/{default_test_unit_runner.rb → default_guard_test_runner.rb} +19 -15
- data/lib/guard/test/runners/default_guard_test_runner.rbc +1471 -0
- data/lib/guard/test/runners/default_test_unit_runner.rbc +2 -2
- data/lib/guard/test/runners/{fastfail_test_unit_runner.rb → fastfail_guard_test_runner.rb} +11 -7
- data/lib/guard/test/runners/fastfail_guard_test_runner.rbc +614 -0
- data/lib/guard/test/runners/fastfail_test_unit_runner.rbc +1 -1
- data/lib/guard/test/templates/Guardfile +6 -6
- data/lib/guard/test/ui.rb +38 -0
- data/lib/guard/test/ui.rbc +1053 -0
- data/lib/guard/test/version.rb +2 -1
- data/lib/guard/test/version.rbc +6 -6
- metadata +49 -21
- data/README.rdoc +0 -89
- data/lib/guard/test/formatter.rb +0 -68
data/lib/guard/test/inspector.rb
CHANGED
@@ -1,30 +1,31 @@
|
|
1
|
+
# encoding: utf-8
|
1
2
|
module Guard
|
2
3
|
class Test
|
3
4
|
module Inspector
|
4
|
-
class << self
|
5
5
|
|
6
|
+
class << self
|
6
7
|
def clean(paths)
|
7
8
|
paths.uniq!
|
8
9
|
paths.compact!
|
9
|
-
|
10
|
+
paths = paths.select { |p| test_file?(p) || test_folder?(p) }
|
10
11
|
|
11
|
-
paths.each do |path|
|
12
|
+
paths.dup.each do |path|
|
12
13
|
if File.directory?(path)
|
13
|
-
|
14
|
-
|
14
|
+
paths.delete(path)
|
15
|
+
paths += Dir.glob("#{path}/**/*_test.rb")
|
15
16
|
end
|
16
17
|
end
|
17
18
|
|
18
|
-
|
19
|
-
|
19
|
+
paths.uniq!
|
20
|
+
paths.compact!
|
20
21
|
clear_test_files_list
|
21
|
-
|
22
|
+
paths.sort
|
22
23
|
end
|
23
24
|
|
24
|
-
|
25
|
+
private
|
25
26
|
|
26
27
|
def test_folder?(path)
|
27
|
-
path.match(/^\/?test/) && !path.match(/\..+$/)
|
28
|
+
path.match(/^\/?test/) && !path.match(/\..+$/) && File.directory?(path)
|
28
29
|
end
|
29
30
|
|
30
31
|
def test_file?(path)
|
@@ -32,14 +33,14 @@ module Guard
|
|
32
33
|
end
|
33
34
|
|
34
35
|
def test_files
|
35
|
-
@test_files ||= Dir.glob(
|
36
|
+
@test_files ||= Dir.glob('test/**/test_*.rb') + Dir.glob('test/**/*_test.rb')
|
36
37
|
end
|
37
38
|
|
38
39
|
def clear_test_files_list
|
39
40
|
@test_files = nil
|
40
41
|
end
|
41
|
-
|
42
42
|
end
|
43
|
+
|
43
44
|
end
|
44
45
|
end
|
45
46
|
end
|
@@ -1,5 +1,5 @@
|
|
1
1
|
!RBIX
|
2
|
-
|
2
|
+
17831730954501249321
|
3
3
|
x
|
4
4
|
M
|
5
5
|
1
|
@@ -181,33 +181,35 @@ x
|
|
181
181
|
9
|
182
182
|
Inspector
|
183
183
|
i
|
184
|
-
|
184
|
+
30
|
185
185
|
5
|
186
186
|
66
|
187
187
|
5
|
188
188
|
99
|
189
|
+
43
|
190
|
+
0
|
189
191
|
12
|
190
192
|
49
|
191
|
-
|
193
|
+
1
|
192
194
|
1
|
193
195
|
13
|
194
196
|
99
|
195
197
|
12
|
196
198
|
7
|
197
|
-
|
199
|
+
2
|
198
200
|
12
|
199
201
|
7
|
200
|
-
|
202
|
+
3
|
201
203
|
12
|
202
204
|
65
|
203
205
|
12
|
204
206
|
49
|
205
|
-
|
207
|
+
4
|
206
208
|
4
|
207
209
|
15
|
208
210
|
54
|
209
211
|
50
|
210
|
-
|
212
|
+
2
|
211
213
|
0
|
212
214
|
11
|
213
215
|
I
|
@@ -220,10 +222,13 @@ I
|
|
220
222
|
0
|
221
223
|
n
|
222
224
|
p
|
225
|
+
5
|
226
|
+
x
|
223
227
|
4
|
228
|
+
Type
|
224
229
|
x
|
225
|
-
|
226
|
-
|
230
|
+
22
|
231
|
+
object_singleton_class
|
227
232
|
x
|
228
233
|
18
|
229
234
|
__metaclass_init__
|
@@ -334,7 +339,7 @@ x
|
|
334
339
|
5
|
335
340
|
clean
|
336
341
|
i
|
337
|
-
|
342
|
+
55
|
338
343
|
20
|
339
344
|
0
|
340
345
|
49
|
@@ -355,49 +360,52 @@ i
|
|
355
360
|
3
|
356
361
|
0
|
357
362
|
19
|
358
|
-
|
363
|
+
0
|
359
364
|
15
|
360
365
|
20
|
361
366
|
0
|
362
|
-
|
367
|
+
49
|
363
368
|
4
|
364
|
-
|
369
|
+
0
|
370
|
+
56
|
365
371
|
5
|
372
|
+
50
|
373
|
+
6
|
366
374
|
0
|
367
375
|
15
|
368
376
|
20
|
369
|
-
|
377
|
+
0
|
370
378
|
49
|
371
379
|
0
|
372
380
|
0
|
373
381
|
15
|
374
382
|
20
|
375
|
-
|
383
|
+
0
|
376
384
|
49
|
377
385
|
1
|
378
386
|
0
|
379
387
|
15
|
380
388
|
5
|
381
389
|
48
|
382
|
-
|
390
|
+
7
|
383
391
|
15
|
384
392
|
20
|
385
|
-
|
393
|
+
0
|
386
394
|
49
|
387
|
-
|
395
|
+
8
|
388
396
|
0
|
389
397
|
11
|
390
398
|
I
|
391
|
-
|
399
|
+
3
|
392
400
|
I
|
393
|
-
|
401
|
+
1
|
394
402
|
I
|
395
403
|
1
|
396
404
|
I
|
397
405
|
1
|
398
406
|
n
|
399
407
|
p
|
400
|
-
|
408
|
+
9
|
401
409
|
x
|
402
410
|
5
|
403
411
|
uniq!
|
@@ -463,7 +471,7 @@ p
|
|
463
471
|
I
|
464
472
|
0
|
465
473
|
I
|
466
|
-
|
474
|
+
a
|
467
475
|
I
|
468
476
|
17
|
469
477
|
x
|
@@ -477,6 +485,9 @@ p
|
|
477
485
|
x
|
478
486
|
6
|
479
487
|
select
|
488
|
+
x
|
489
|
+
3
|
490
|
+
dup
|
480
491
|
M
|
481
492
|
1
|
482
493
|
p
|
@@ -507,7 +518,7 @@ i
|
|
507
518
|
48
|
508
519
|
21
|
509
520
|
1
|
510
|
-
|
521
|
+
0
|
511
522
|
20
|
512
523
|
0
|
513
524
|
49
|
@@ -516,7 +527,7 @@ i
|
|
516
527
|
15
|
517
528
|
21
|
518
529
|
1
|
519
|
-
|
530
|
+
0
|
520
531
|
45
|
521
532
|
4
|
522
533
|
5
|
@@ -536,7 +547,7 @@ i
|
|
536
547
|
9
|
537
548
|
22
|
538
549
|
1
|
539
|
-
|
550
|
+
0
|
540
551
|
8
|
541
552
|
49
|
542
553
|
1
|
@@ -579,27 +590,31 @@ x
|
|
579
590
|
1
|
580
591
|
+
|
581
592
|
p
|
582
|
-
|
593
|
+
13
|
583
594
|
I
|
584
595
|
0
|
585
596
|
I
|
586
|
-
|
597
|
+
c
|
587
598
|
I
|
588
599
|
4
|
589
600
|
I
|
590
|
-
|
601
|
+
d
|
591
602
|
I
|
592
603
|
e
|
593
604
|
I
|
594
|
-
|
605
|
+
e
|
595
606
|
I
|
596
607
|
17
|
597
608
|
I
|
598
|
-
|
609
|
+
f
|
599
610
|
I
|
600
611
|
30
|
601
612
|
I
|
602
|
-
|
613
|
+
d
|
614
|
+
I
|
615
|
+
31
|
616
|
+
I
|
617
|
+
0
|
603
618
|
I
|
604
619
|
32
|
605
620
|
x
|
@@ -624,53 +639,50 @@ p
|
|
624
639
|
I
|
625
640
|
-1
|
626
641
|
I
|
627
|
-
|
642
|
+
7
|
628
643
|
I
|
629
644
|
0
|
630
645
|
I
|
631
|
-
|
646
|
+
8
|
632
647
|
I
|
633
648
|
6
|
634
649
|
I
|
635
|
-
|
650
|
+
9
|
636
651
|
I
|
637
652
|
c
|
638
653
|
I
|
639
|
-
|
654
|
+
a
|
640
655
|
I
|
641
656
|
16
|
642
657
|
I
|
643
|
-
|
644
|
-
I
|
645
|
-
1e
|
646
|
-
I
|
647
|
-
12
|
658
|
+
c
|
648
659
|
I
|
649
|
-
|
660
|
+
21
|
650
661
|
I
|
651
662
|
13
|
652
663
|
I
|
653
|
-
|
664
|
+
27
|
654
665
|
I
|
655
666
|
14
|
656
667
|
I
|
657
|
-
|
668
|
+
2d
|
658
669
|
I
|
659
670
|
15
|
660
671
|
I
|
661
|
-
|
672
|
+
31
|
673
|
+
I
|
674
|
+
16
|
675
|
+
I
|
676
|
+
37
|
662
677
|
x
|
663
678
|
78
|
664
679
|
/Users/remy/Development/Ruby/Gems/guard/guard-test/lib/guard/test/inspector.rb
|
665
680
|
p
|
666
|
-
|
681
|
+
1
|
667
682
|
x
|
668
683
|
5
|
669
684
|
paths
|
670
685
|
x
|
671
|
-
11
|
672
|
-
clean_paths
|
673
|
-
x
|
674
686
|
17
|
675
687
|
method_visibility
|
676
688
|
x
|
@@ -690,7 +702,7 @@ x
|
|
690
702
|
12
|
691
703
|
test_folder?
|
692
704
|
i
|
693
|
-
|
705
|
+
69
|
694
706
|
20
|
695
707
|
0
|
696
708
|
7
|
@@ -716,7 +728,7 @@ i
|
|
716
728
|
1
|
717
729
|
13
|
718
730
|
9
|
719
|
-
|
731
|
+
68
|
720
732
|
15
|
721
733
|
20
|
722
734
|
0
|
@@ -747,6 +759,18 @@ i
|
|
747
759
|
8
|
748
760
|
56
|
749
761
|
3
|
762
|
+
13
|
763
|
+
9
|
764
|
+
68
|
765
|
+
15
|
766
|
+
45
|
767
|
+
7
|
768
|
+
8
|
769
|
+
20
|
770
|
+
0
|
771
|
+
49
|
772
|
+
9
|
773
|
+
1
|
750
774
|
11
|
751
775
|
I
|
752
776
|
5
|
@@ -758,7 +782,7 @@ I
|
|
758
782
|
1
|
759
783
|
n
|
760
784
|
p
|
761
|
-
|
785
|
+
10
|
762
786
|
n
|
763
787
|
x
|
764
788
|
6
|
@@ -776,18 +800,25 @@ n
|
|
776
800
|
s
|
777
801
|
5
|
778
802
|
\..+$
|
803
|
+
x
|
804
|
+
4
|
805
|
+
File
|
806
|
+
n
|
807
|
+
x
|
808
|
+
10
|
809
|
+
directory?
|
779
810
|
p
|
780
811
|
5
|
781
812
|
I
|
782
813
|
-1
|
783
814
|
I
|
784
|
-
|
815
|
+
1b
|
785
816
|
I
|
786
817
|
0
|
787
818
|
I
|
788
|
-
|
819
|
+
1c
|
789
820
|
I
|
790
|
-
|
821
|
+
45
|
791
822
|
x
|
792
823
|
78
|
793
824
|
/Users/remy/Development/Ruby/Gems/guard/guard-test/lib/guard/test/inspector.rb
|
@@ -839,11 +870,11 @@ p
|
|
839
870
|
I
|
840
871
|
-1
|
841
872
|
I
|
842
|
-
|
873
|
+
1f
|
843
874
|
I
|
844
875
|
0
|
845
876
|
I
|
846
|
-
|
877
|
+
20
|
847
878
|
I
|
848
879
|
9
|
849
880
|
x
|
@@ -865,12 +896,12 @@ x
|
|
865
896
|
10
|
866
897
|
test_files
|
867
898
|
i
|
868
|
-
|
899
|
+
29
|
869
900
|
39
|
870
901
|
0
|
871
902
|
13
|
872
903
|
10
|
873
|
-
|
904
|
+
28
|
874
905
|
15
|
875
906
|
45
|
876
907
|
1
|
@@ -881,11 +912,22 @@ i
|
|
881
912
|
49
|
882
913
|
4
|
883
914
|
1
|
915
|
+
45
|
916
|
+
1
|
917
|
+
5
|
918
|
+
7
|
919
|
+
6
|
920
|
+
64
|
921
|
+
49
|
922
|
+
4
|
923
|
+
1
|
924
|
+
81
|
925
|
+
7
|
884
926
|
38
|
885
927
|
0
|
886
928
|
11
|
887
929
|
I
|
888
|
-
|
930
|
+
3
|
889
931
|
I
|
890
932
|
0
|
891
933
|
I
|
@@ -894,7 +936,7 @@ I
|
|
894
936
|
0
|
895
937
|
n
|
896
938
|
p
|
897
|
-
|
939
|
+
8
|
898
940
|
x
|
899
941
|
11
|
900
942
|
@test_files
|
@@ -904,22 +946,29 @@ Dir
|
|
904
946
|
n
|
905
947
|
s
|
906
948
|
17
|
907
|
-
test
|
949
|
+
test/**/test_*.rb
|
908
950
|
x
|
909
951
|
4
|
910
952
|
glob
|
953
|
+
n
|
954
|
+
s
|
955
|
+
17
|
956
|
+
test/**/*_test.rb
|
957
|
+
x
|
958
|
+
1
|
959
|
+
+
|
911
960
|
p
|
912
961
|
5
|
913
962
|
I
|
914
963
|
-1
|
915
964
|
I
|
916
|
-
|
965
|
+
23
|
917
966
|
I
|
918
967
|
0
|
919
968
|
I
|
920
|
-
|
969
|
+
24
|
921
970
|
I
|
922
|
-
|
971
|
+
1d
|
923
972
|
x
|
924
973
|
78
|
925
974
|
/Users/remy/Development/Ruby/Gems/guard/guard-test/lib/guard/test/inspector.rb
|
@@ -960,11 +1009,11 @@ p
|
|
960
1009
|
I
|
961
1010
|
-1
|
962
1011
|
I
|
963
|
-
|
1012
|
+
27
|
964
1013
|
I
|
965
1014
|
0
|
966
1015
|
I
|
967
|
-
|
1016
|
+
28
|
968
1017
|
I
|
969
1018
|
4
|
970
1019
|
x
|
@@ -977,27 +1026,27 @@ p
|
|
977
1026
|
I
|
978
1027
|
2
|
979
1028
|
I
|
980
|
-
|
1029
|
+
7
|
981
1030
|
I
|
982
1031
|
10
|
983
1032
|
I
|
984
|
-
|
1033
|
+
19
|
985
1034
|
I
|
986
1035
|
14
|
987
1036
|
I
|
988
|
-
|
1037
|
+
1b
|
989
1038
|
I
|
990
1039
|
22
|
991
1040
|
I
|
992
|
-
|
1041
|
+
1f
|
993
1042
|
I
|
994
1043
|
30
|
995
1044
|
I
|
996
|
-
|
1045
|
+
23
|
997
1046
|
I
|
998
1047
|
3e
|
999
1048
|
I
|
1000
|
-
|
1049
|
+
27
|
1001
1050
|
I
|
1002
1051
|
4c
|
1003
1052
|
x
|
@@ -1013,9 +1062,9 @@ p
|
|
1013
1062
|
I
|
1014
1063
|
2
|
1015
1064
|
I
|
1016
|
-
|
1065
|
+
6
|
1017
1066
|
I
|
1018
|
-
|
1067
|
+
1e
|
1019
1068
|
x
|
1020
1069
|
78
|
1021
1070
|
/Users/remy/Development/Ruby/Gems/guard/guard-test/lib/guard/test/inspector.rb
|
@@ -1029,7 +1078,7 @@ p
|
|
1029
1078
|
I
|
1030
1079
|
2
|
1031
1080
|
I
|
1032
|
-
|
1081
|
+
4
|
1033
1082
|
I
|
1034
1083
|
1c
|
1035
1084
|
x
|
@@ -1045,7 +1094,7 @@ p
|
|
1045
1094
|
I
|
1046
1095
|
2
|
1047
1096
|
I
|
1048
|
-
|
1097
|
+
3
|
1049
1098
|
I
|
1050
1099
|
1d
|
1051
1100
|
x
|
@@ -1061,7 +1110,7 @@ p
|
|
1061
1110
|
I
|
1062
1111
|
0
|
1063
1112
|
I
|
1064
|
-
|
1113
|
+
2
|
1065
1114
|
I
|
1066
1115
|
1c
|
1067
1116
|
x
|