dohtest 0.1.19 → 0.1.20
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/bin/dohtest +5 -1
- data/lib/dohtest/stream_output.rb +9 -3
- metadata +12 -18
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 8df6976f81e9a4acbd2f713cd9ff2e67a3cca0ad
|
4
|
+
data.tar.gz: 48a552d7689a2c2b524c12aca3e18476520c0e18
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 65f4a06544c0913c4b15e7d754554f13f1bc653c368e06d16cb56baffeab8d73f694cf6d3681359bddefa0b11ef47654589597d893ec7329c3961da7f62d754c
|
7
|
+
data.tar.gz: c3a2aaeaa88078aef142c547c31fc3e5a51bc2b5069648fe081be79d05cbebff98585a9816c3729df0be1a896e852f6fb66ac65686b461675f4d2721289709fe
|
data/bin/dohtest
CHANGED
@@ -5,8 +5,10 @@ require 'dohtest'
|
|
5
5
|
opts = Doh::Options.new({
|
6
6
|
'grep' => [nil, "-g", "--grep <name>", "only execute tests with name that include the given value."],
|
7
7
|
'glob' => [nil, "-b", "--glob <string>", "glob string to find test files. defaults to *.dt.rb"],
|
8
|
-
'seed' => [nil, "-
|
8
|
+
'seed' => [nil, "-s", "--seed <number>", "use this as the seed to srand"],
|
9
9
|
'no_color' => [nil, '-c', '--no_color', "use this if you don't want ANSI color codes"],
|
10
|
+
'verbose' => [nil, '-v', '--verbose', "use this to generate more output"],
|
11
|
+
'quiet' => [nil, '-q', '--quiet', "use this to generate less output"],
|
10
12
|
}, true, 'Files or directories may be specified to run tests on. Directories will be treated recursively. Defaults to the current directory.')
|
11
13
|
|
12
14
|
paths = (if opts.varargs.empty? then ['.'] else opts.varargs end)
|
@@ -16,5 +18,7 @@ DohTest.config[:grep] = opts.grep if opts.grep
|
|
16
18
|
DohTest.config[:glob] = opts.glob if opts.glob
|
17
19
|
DohTest.config[:seed] = opts.seed.to_i if opts.seed
|
18
20
|
DohTest.config[:no_color] = true if opts.no_color
|
21
|
+
DohTest.config[:verbose] = true if opts.verbose
|
22
|
+
DohTest.config[:quiet] = true if opts.quiet
|
19
23
|
|
20
24
|
exit DohTest::MasterRunner.new(DohTest::StreamOutput.new, DohTest.config, paths).run
|
@@ -16,6 +16,10 @@ class StreamOutput
|
|
16
16
|
def run_begin(config)
|
17
17
|
@config = config
|
18
18
|
puts "running tests with config: #{config}"
|
19
|
+
|
20
|
+
has_terminal = $stdout.tty?
|
21
|
+
@no_color = !has_terminal || @config[:no_color]
|
22
|
+
@verbose = (has_terminal && !@config[:quiet]) || @config[:verbose]
|
19
23
|
end
|
20
24
|
|
21
25
|
def run_end(duration)
|
@@ -84,8 +88,10 @@ class StreamOutput
|
|
84
88
|
@groups_ran += 1
|
85
89
|
total_tests = tests_ran + tests_skipped
|
86
90
|
total_assertions = assertions_passed + assertions_failed
|
87
|
-
|
88
|
-
|
91
|
+
if @verbose
|
92
|
+
skipped_str = if tests_skipped > 0 then ": #{tests_ran} ran, #{tests_skipped} skipped" else '' end
|
93
|
+
puts "success in #{group_name}: #{total_tests} tests#{skipped_str}; #{total_assertions} assertions" unless @badness.include?(group_name)
|
94
|
+
end
|
89
95
|
end
|
90
96
|
|
91
97
|
def test_begin(group_name, test_name)
|
@@ -118,7 +124,7 @@ class StreamOutput
|
|
118
124
|
|
119
125
|
private
|
120
126
|
def colorize(type, msg)
|
121
|
-
return msg if @
|
127
|
+
return msg if @no_color
|
122
128
|
color = @config["#{type}_color".to_sym] || DEFAULT_COLORS[type]
|
123
129
|
"#{Term::ANSIColor.send(color)}#{Term::ANSIColor.bold}#{msg}#{Term::ANSIColor.clear}"
|
124
130
|
end
|
metadata
CHANGED
@@ -1,8 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dohtest
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
5
|
-
prerelease:
|
4
|
+
version: 0.1.20
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Makani Mason
|
@@ -10,38 +9,34 @@ authors:
|
|
10
9
|
autorequire:
|
11
10
|
bindir: bin
|
12
11
|
cert_chain: []
|
13
|
-
date: 2013-
|
12
|
+
date: 2013-06-11 00:00:00.000000000 Z
|
14
13
|
dependencies:
|
15
14
|
- !ruby/object:Gem::Dependency
|
16
15
|
name: dohroot
|
17
16
|
requirement: !ruby/object:Gem::Requirement
|
18
|
-
none: false
|
19
17
|
requirements:
|
20
|
-
- -
|
18
|
+
- - '>='
|
21
19
|
- !ruby/object:Gem::Version
|
22
20
|
version: 0.1.2
|
23
21
|
type: :runtime
|
24
22
|
prerelease: false
|
25
23
|
version_requirements: !ruby/object:Gem::Requirement
|
26
|
-
none: false
|
27
24
|
requirements:
|
28
|
-
- -
|
25
|
+
- - '>='
|
29
26
|
- !ruby/object:Gem::Version
|
30
27
|
version: 0.1.2
|
31
28
|
- !ruby/object:Gem::Dependency
|
32
29
|
name: term-ansicolor
|
33
30
|
requirement: !ruby/object:Gem::Requirement
|
34
|
-
none: false
|
35
31
|
requirements:
|
36
|
-
- -
|
32
|
+
- - '>='
|
37
33
|
- !ruby/object:Gem::Version
|
38
34
|
version: 1.0.7
|
39
35
|
type: :runtime
|
40
36
|
prerelease: false
|
41
37
|
version_requirements: !ruby/object:Gem::Requirement
|
42
|
-
none: false
|
43
38
|
requirements:
|
44
|
-
- -
|
39
|
+
- - '>='
|
45
40
|
- !ruby/object:Gem::Version
|
46
41
|
version: 1.0.7
|
47
42
|
description: Minimalist unit test framework, easy to understand and extend.
|
@@ -56,6 +51,7 @@ extra_rdoc_files:
|
|
56
51
|
files:
|
57
52
|
- bin/dohtest
|
58
53
|
- bin/dohtest_repeat
|
54
|
+
- lib/dohtest.rb
|
59
55
|
- lib/dohtest/assertions.rb
|
60
56
|
- lib/dohtest/backtrace_parser.rb
|
61
57
|
- lib/dohtest/capture_output.rb
|
@@ -66,34 +62,32 @@ files:
|
|
66
62
|
- lib/dohtest/require_paths.rb
|
67
63
|
- lib/dohtest/stream_output.rb
|
68
64
|
- lib/dohtest/test_group.rb
|
69
|
-
- lib/dohtest.rb
|
70
65
|
- test/test_backtrace_parser.rb
|
71
66
|
- test/test_group_runner.rb
|
72
67
|
- MIT-LICENSE
|
73
68
|
homepage: https://github.com/atpsoft/dohtest
|
74
69
|
licenses:
|
75
70
|
- MIT
|
71
|
+
metadata: {}
|
76
72
|
post_install_message:
|
77
73
|
rdoc_options: []
|
78
74
|
require_paths:
|
79
75
|
- lib
|
80
76
|
required_ruby_version: !ruby/object:Gem::Requirement
|
81
|
-
none: false
|
82
77
|
requirements:
|
83
|
-
- -
|
78
|
+
- - '>='
|
84
79
|
- !ruby/object:Gem::Version
|
85
80
|
version: 1.9.2
|
86
81
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
87
|
-
none: false
|
88
82
|
requirements:
|
89
|
-
- -
|
83
|
+
- - '>='
|
90
84
|
- !ruby/object:Gem::Version
|
91
85
|
version: '0'
|
92
86
|
requirements: []
|
93
87
|
rubyforge_project:
|
94
|
-
rubygems_version:
|
88
|
+
rubygems_version: 2.0.3
|
95
89
|
signing_key:
|
96
|
-
specification_version:
|
90
|
+
specification_version: 4
|
97
91
|
summary: minimalist unit test framework
|
98
92
|
test_files:
|
99
93
|
- test/test_backtrace_parser.rb
|