minitest-documentation 0.0.2 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +5 -4
- data/lib/minitest/documentation.rb +27 -13
- data/lib/minitest/documentation_plugin.rb +4 -0
- data/minitest-documentation.gemspec +2 -2
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9f290d2966d836bdb4196974ec0cc30f9f959293
|
4
|
+
data.tar.gz: bfea80e6ac93a50ae9b140fd4195bdbe059601ab
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e4e5ceb992a4c9541890639b833d6142361df5613287f6148a60365ffb6ee1f58a8d60cc55f881a48ae835dc18dad6310d8b9c8a5738d9b67e3a80df87a1a761
|
7
|
+
data.tar.gz: d45e93ca06f31480a7156d1872364aaef93b8088a252ea7dd9289b4ef4fd5382664ee106156fdba2fedafc8350f3ab5b391afab1c782e079ff7d24d234cc24ad
|
data/README.md
CHANGED
@@ -68,10 +68,11 @@ Epic Fail!
|
|
68
68
|
You have skipped tests. Run with --verbose for details.
|
69
69
|
```
|
70
70
|
|
71
|
-
|
72
|
-
`
|
73
|
-
`
|
74
|
-
`
|
71
|
+
### Color
|
72
|
+
If you add `--color` as an argument the output will be colorized
|
73
|
+
- `pass` => Green
|
74
|
+
- `skip` => Yellow
|
75
|
+
- `fail` => Red
|
75
76
|
|
76
77
|
## Contributing
|
77
78
|
|
@@ -14,24 +14,32 @@ module Minitest
|
|
14
14
|
@documentation ||= false
|
15
15
|
end
|
16
16
|
|
17
|
-
def
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
YELLOW
|
25
|
-
end
|
17
|
+
def self.color!
|
18
|
+
@color = true
|
19
|
+
end
|
20
|
+
|
21
|
+
def self.color?
|
22
|
+
@color ||= false
|
23
|
+
end
|
26
24
|
|
25
|
+
def record result
|
27
26
|
output_klass_name result.class
|
28
27
|
test = test_name result
|
29
28
|
|
30
|
-
|
29
|
+
if self.class.color?
|
30
|
+
color_code = case result.result_code
|
31
|
+
when "."
|
32
|
+
GREEN
|
33
|
+
when "E", "F"
|
34
|
+
RED
|
35
|
+
when "S"
|
36
|
+
YELLOW
|
37
|
+
end
|
38
|
+
io.print color_code
|
39
|
+
end
|
40
|
+
|
31
41
|
io.print " "
|
32
|
-
io.puts test
|
33
|
-
sub("test_", "").
|
34
|
-
gsub("_", " ")
|
42
|
+
io.puts stringify_test_name(test)
|
35
43
|
io.print NND
|
36
44
|
end
|
37
45
|
|
@@ -48,5 +56,11 @@ module Minitest
|
|
48
56
|
def test_name o
|
49
57
|
o.instance_variable_get "@NAME"
|
50
58
|
end
|
59
|
+
|
60
|
+
def stringify_test_name test
|
61
|
+
test.
|
62
|
+
sub("test_", "").
|
63
|
+
gsub("_", " ")
|
64
|
+
end
|
51
65
|
end
|
52
66
|
end
|
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |spec|
|
4
4
|
spec.name = "minitest-documentation"
|
5
|
-
spec.version = "0.0.
|
5
|
+
spec.version = "0.0.3"
|
6
6
|
spec.authors = ["Teo Ljungberg"]
|
7
7
|
spec.email = ["teo.ljungberg@gmail.com"]
|
8
8
|
spec.summary = %q{Rspec like documentation for Minitest}
|
@@ -13,7 +13,7 @@ Gem::Specification.new do |spec|
|
|
13
13
|
spec.files = `git ls-files`.split($/)
|
14
14
|
spec.require_paths = ["lib"]
|
15
15
|
|
16
|
-
spec.add_dependency "minitest"
|
16
|
+
spec.add_dependency "minitest", "~> 5.2"
|
17
17
|
spec.add_development_dependency "bundler", "~> 1.5"
|
18
18
|
spec.add_development_dependency "rake"
|
19
19
|
end
|
metadata
CHANGED
@@ -1,29 +1,29 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: minitest-documentation
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Teo Ljungberg
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-01-
|
11
|
+
date: 2014-01-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: minitest
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
19
|
+
version: '5.2'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - "
|
24
|
+
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '
|
26
|
+
version: '5.2'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: bundler
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|