spork-minitest 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/Changelog.md +2 -0
- data/Readme.md +54 -0
- data/metatest/test_spork_minitest.rb +24 -0
- metadata +13 -6
data/Changelog.md
ADDED
data/Readme.md
ADDED
@@ -0,0 +1,54 @@
|
|
1
|
+
spork-minitest
|
2
|
+
==============
|
3
|
+
|
4
|
+
MiniTest runner for [Spork](https://github.com/sporkrb/spork).
|
5
|
+
A successor to [spork-testunit](https://github.com/sporkrb/spork-testunit)
|
6
|
+
with the following differences:
|
7
|
+
|
8
|
+
* Supports only Ruby 1.9.
|
9
|
+
|
10
|
+
* Allows passing any options to MiniTest.
|
11
|
+
|
12
|
+
Normally you pass them right at the end:
|
13
|
+
|
14
|
+
`ruby test/test_first.rb --seed 12345 -n test_truth`
|
15
|
+
|
16
|
+
When using testdrb you pass them after double dash:
|
17
|
+
|
18
|
+
`testdrb test/first_test.rb -- --seed 12345 -n test_truth`
|
19
|
+
|
20
|
+
* Exits with proper code (0 for success, 1 for failure).
|
21
|
+
|
22
|
+
Some automated test running tools like Autotest and Guard
|
23
|
+
rely on this to detect test failure.
|
24
|
+
|
25
|
+
* Does not support -I option, hardcoded to add `.` and `test` to the load path.
|
26
|
+
|
27
|
+
Usage
|
28
|
+
-----
|
29
|
+
|
30
|
+
Add it to your gemfile.
|
31
|
+
|
32
|
+
gem "spork-minitest", "~> 0.0.2"
|
33
|
+
|
34
|
+
Install spork into your test helper using the following command or manually.
|
35
|
+
|
36
|
+
spork minitest --bootstrap
|
37
|
+
|
38
|
+
Start `spork` and run your tests using `testdrb`.
|
39
|
+
|
40
|
+
testdrb test/integration_test.rb
|
41
|
+
|
42
|
+
If you use [Autotest](https://github.com/seattlerb/zentest) you can run
|
43
|
+
all tests over Spork by adding the following lines to your .autotest file.
|
44
|
+
|
45
|
+
class Autotest
|
46
|
+
# run tests over drb server (spork)
|
47
|
+
def make_test_cmd files_to_test
|
48
|
+
if files_to_test.empty?
|
49
|
+
"" # no tests to run
|
50
|
+
else
|
51
|
+
"bin/testdrb #{files_to_test.keys.join(' ')}"
|
52
|
+
end
|
53
|
+
end
|
54
|
+
end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
require "minitest/autorun"
|
2
|
+
|
3
|
+
module Spork
|
4
|
+
class TestFramework
|
5
|
+
end
|
6
|
+
end
|
7
|
+
|
8
|
+
require "spork/test_framework/minitest"
|
9
|
+
|
10
|
+
class TestParseOptions < MiniTest::Unit::TestCase
|
11
|
+
def test_full
|
12
|
+
assert_equal [%w[foo bar], %w[--seed 123]], parse_options(%w[foo bar -- --seed 123])
|
13
|
+
end
|
14
|
+
|
15
|
+
def test_only_paths
|
16
|
+
assert_equal [%w[foo bar], []], parse_options(%w[foo bar])
|
17
|
+
end
|
18
|
+
|
19
|
+
def parse_options(*args, &block)
|
20
|
+
@runner ||= Spork::TestFramework::MiniTest.new
|
21
|
+
@runner.parse_options(*args, &block)
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: spork-minitest
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-
|
12
|
+
date: 2012-04-30 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: spork
|
16
|
-
requirement:
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,7 +21,12 @@ dependencies:
|
|
21
21
|
version: '0'
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements:
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ! '>='
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '0'
|
25
30
|
description:
|
26
31
|
email:
|
27
32
|
- sema@sema.in
|
@@ -32,6 +37,9 @@ extra_rdoc_files: []
|
|
32
37
|
files:
|
33
38
|
- bin/testdrb
|
34
39
|
- lib/spork/test_framework/minitest.rb
|
40
|
+
- metatest/test_spork_minitest.rb
|
41
|
+
- Readme.md
|
42
|
+
- Changelog.md
|
35
43
|
homepage: https://github.com/semaperepelitsa/spork-minitest
|
36
44
|
licenses: []
|
37
45
|
post_install_message:
|
@@ -52,9 +60,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
52
60
|
version: '0'
|
53
61
|
requirements: []
|
54
62
|
rubyforge_project:
|
55
|
-
rubygems_version: 1.8.
|
63
|
+
rubygems_version: 1.8.23
|
56
64
|
signing_key:
|
57
65
|
specification_version: 3
|
58
66
|
summary: MiniTest runner for Spork
|
59
67
|
test_files: []
|
60
|
-
has_rdoc:
|