minitest-sprint 1.0.0 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/History.rdoc +7 -0
- data/Manifest.txt +1 -0
- data/README.rdoc +27 -3
- data/bin/minitest +11 -5
- data/lib/minitest/binstub_reporter.rb +1 -1
- data/lib/minitest/complete.rb +35 -0
- data/lib/minitest/sprint.rb +1 -1
- metadata +3 -2
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 39fd43af973b488a096f56c1aa32a3a8584be410
|
4
|
+
data.tar.gz: 0064c58eb738f8c218f4f8664d11c609b7ca733b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c8adb465087c6f2633052ececb5c2817af17fec07e96c9f637c448fbb369be76f42603fa9cdd52acadea9fbbfc518e3dcaa8f6f3b8996e5ba08997f4d5ad03c3
|
7
|
+
data.tar.gz: e4e2b0e2876dc4d7474a5e02a669f7d4cda0bc7c5ea27560774c3070abe4b9d3307297d9bcd2ce37bd28ed2bc23a5eedcf11a760c60366019e6f7fd3ef914600
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/History.rdoc
CHANGED
@@ -1,3 +1,10 @@
|
|
1
|
+
=== 1.1.0 / 2015-03-09
|
2
|
+
|
3
|
+
* 2 minor enhancements:
|
4
|
+
|
5
|
+
* Added minitest/complete for cmdline test name completion. (tenderlove)
|
6
|
+
* bin/minitest now directly loads tests, supports specifying files and minitest args.
|
7
|
+
|
1
8
|
=== 1.0.0 / 2015-01-23
|
2
9
|
|
3
10
|
* 1 major enhancement
|
data/Manifest.txt
CHANGED
data/README.rdoc
CHANGED
@@ -8,14 +8,38 @@ rdoc :: http://docs.seattlerb.org/minitest-sprint
|
|
8
8
|
Runs (Get it? It's fast!) your tests and makes it easier to rerun individual
|
9
9
|
failures.
|
10
10
|
|
11
|
+
=== Tab Completion
|
12
|
+
|
13
|
+
Add this to your .bashrc (or .zshrc?--someone please confirm with a PR):
|
14
|
+
|
15
|
+
$ complete -o bashdefault -f -C 'ruby --disable-gems $(gem which minitest/complete)' minitest
|
16
|
+
|
17
|
+
Running individual minitest tests will now have tab completion for the
|
18
|
+
method names. When running tests, just hit tab after -n. For example:
|
19
|
+
|
20
|
+
$ minitest test/test_whatever.rb -n test_thingy<TAB><TAB>
|
21
|
+
test_thingy_error
|
22
|
+
test_thingy_error_teardown
|
23
|
+
test_thingy_failing
|
24
|
+
test_thingy_failing_filtered
|
25
|
+
... etc ...
|
26
|
+
|
11
27
|
== FEATURES/PROBLEMS:
|
12
28
|
|
13
|
-
* TEENY implementation.
|
14
|
-
*
|
29
|
+
* TEENY implementation.
|
30
|
+
* Includes a script for commandline autocompletion of test names.
|
31
|
+
* Includes extra plugins to print out failure re-run commands.
|
32
|
+
* One for the minitest commandline runner. (--binstub)
|
33
|
+
* One for rake test runners. (--rake)
|
15
34
|
|
16
35
|
== SYNOPSIS:
|
17
36
|
|
18
|
-
|
37
|
+
$ minitest test/test_whatever.rb -n test_thingy<TAB><TAB>
|
38
|
+
test_thingy_error
|
39
|
+
test_thingy_error_teardown
|
40
|
+
test_thingy_failing
|
41
|
+
test_thingy_failing_filtered
|
42
|
+
... etc ...
|
19
43
|
|
20
44
|
== REQUIREMENTS:
|
21
45
|
|
data/bin/minitest
CHANGED
@@ -1,9 +1,15 @@
|
|
1
1
|
#!/usr/bin/ruby -w
|
2
2
|
|
3
|
-
|
3
|
+
$:.unshift "test"
|
4
|
+
$:.unshift "lib"
|
4
5
|
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
6
|
+
require "minitest/autorun"
|
7
|
+
|
8
|
+
files, args = ARGV.partition { |f| File.exist? f }
|
9
|
+
files = Dir["test/**/{test_*,*_test}.rb"] if files.empty?
|
10
|
+
|
11
|
+
ARGV.replace args
|
12
|
+
|
13
|
+
files.each do |f|
|
14
|
+
require "./#{f}"
|
9
15
|
end
|
@@ -0,0 +1,35 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
# see instructions in the readme for use
|
4
|
+
|
5
|
+
require 'optparse'
|
6
|
+
require 'shellwords'
|
7
|
+
|
8
|
+
argv = Shellwords.split(ENV['COMP_LINE']).drop 1
|
9
|
+
options = {}
|
10
|
+
|
11
|
+
begin
|
12
|
+
OptionParser.new do |opts|
|
13
|
+
opts.on("-n", "--name [METHOD]", "Test method") do |m|
|
14
|
+
options[:method] = m
|
15
|
+
end
|
16
|
+
end.parse!(argv)
|
17
|
+
rescue
|
18
|
+
retry # ignore options passed to Ruby
|
19
|
+
end
|
20
|
+
|
21
|
+
file = argv.find { |f| File.file?(f) && !File.directory?(f) }
|
22
|
+
|
23
|
+
exit unless options.key?(:method) && file
|
24
|
+
|
25
|
+
require 'ripper'
|
26
|
+
|
27
|
+
methods = []
|
28
|
+
K = Class.new(Ripper) { define_method(:on_def) { |n,_,_| methods << n } }
|
29
|
+
|
30
|
+
begin
|
31
|
+
K.parse File.read(file), file, 1
|
32
|
+
methods = methods.grep(/^#{options[:method]}/) if options[:method]
|
33
|
+
puts methods.join("\n")
|
34
|
+
rescue # give up on parse errors
|
35
|
+
end
|
data/lib/minitest/sprint.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: minitest-sprint
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ryan Davis
|
@@ -29,7 +29,7 @@ cert_chain:
|
|
29
29
|
xJcC6UN6NHMOVMyAXsr2HR0gRRx4ofN1LoP2KhXzSr8UMvQYlwPmE0N5GQv1b5AO
|
30
30
|
VpzF30vNaJK6ZT7xlIsIlwmH
|
31
31
|
-----END CERTIFICATE-----
|
32
|
-
date: 2015-
|
32
|
+
date: 2015-03-09 00:00:00.000000000 Z
|
33
33
|
dependencies:
|
34
34
|
- !ruby/object:Gem::Dependency
|
35
35
|
name: minitest
|
@@ -94,6 +94,7 @@ files:
|
|
94
94
|
- Rakefile
|
95
95
|
- bin/minitest
|
96
96
|
- lib/minitest/binstub_reporter.rb
|
97
|
+
- lib/minitest/complete.rb
|
97
98
|
- lib/minitest/rake_reporter.rb
|
98
99
|
- lib/minitest/sprint.rb
|
99
100
|
- lib/minitest/sprint_plugin.rb
|
metadata.gz.sig
CHANGED
Binary file
|