autotest 4.4.1 → 4.4.2
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +5 -0
- data/{README.markdown → Readme.md} +9 -7
- data/VERSION +1 -1
- data/autotest.gemspec +3 -6
- data/bin/autotest +5 -2
- data/test/test_autotest_integration.rb +5 -0
- metadata +6 -6
data/Rakefile
CHANGED
@@ -6,6 +6,11 @@ require 'rake/testtask'
|
|
6
6
|
Rake::TestTask.new(:test) {|test| test.libs << "test"}
|
7
7
|
task :default => :test
|
8
8
|
|
9
|
+
desc "show help"
|
10
|
+
task :help do
|
11
|
+
puts `./bin/autotest --help`
|
12
|
+
end
|
13
|
+
|
9
14
|
desc "run autotest on itself"
|
10
15
|
task :autotest do
|
11
16
|
ruby "-Ilib -w ./bin/autotest"
|
@@ -1,17 +1,18 @@
|
|
1
1
|
As soon as you save a file, autotest will run the matching tests.
|
2
2
|
|
3
|
-
|
3
|
+
(Extracted from ZenTest)
|
4
4
|
|
5
5
|
Improvements over ZenTest
|
6
6
|
=========================
|
7
|
-
-
|
8
|
-
-
|
7
|
+
- `-c` not run all tests after a failed test passes
|
8
|
+
- `-r` use given config file
|
9
|
+
- `-p` use parallel_tests to run tests
|
10
|
+
- `-s` use any style you want -> `alias autospec2="autotest --style rspec2"`
|
9
11
|
- simplified test setup
|
10
12
|
- simplified packaging
|
11
|
-
- less globals
|
13
|
+
- less globals
|
12
14
|
- integration tests
|
13
15
|
|
14
|
-
|
15
16
|
Install
|
16
17
|
=======
|
17
18
|
Uninstall ZenTest first, or autotest will not be found:
|
@@ -31,13 +32,14 @@ Usage
|
|
31
32
|
|
32
33
|
### Options
|
33
34
|
-f, --fast-start Do not run full tests at start
|
35
|
+
-p, --parallel Run tests in parallel (experimental) -- gem install parallel_tests)
|
34
36
|
-c, --no-full-after-failed Do not run full tests after failed test passed
|
35
37
|
-v, --verbose Be verbose. Prints files that autotest doesn't know how to map to tests
|
36
38
|
-q, --quiet Be quiet.
|
37
|
-
-r, --rc
|
39
|
+
-r, --rc CONFIG Path to config file. (Defaults to ~/.autotest or current_dir/.autotest)
|
40
|
+
-s, --style STYLE Which style to use, e.g. rspec, rspec2
|
38
41
|
-h, --help Show this.
|
39
42
|
|
40
|
-
|
41
43
|
Tips
|
42
44
|
====
|
43
45
|
- you need diff.exe on windows. Try http://gnuwin32.sourceforge.net/packages.html
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
4.4.
|
1
|
+
4.4.2
|
data/autotest.gemspec
CHANGED
@@ -5,21 +5,18 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{autotest}
|
8
|
-
s.version = "4.4.
|
8
|
+
s.version = "4.4.2"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Ryan Davis"]
|
12
|
-
s.date = %q{2010-
|
12
|
+
s.date = %q{2010-11-02}
|
13
13
|
s.executables = ["autotest", "unit_diff"]
|
14
|
-
s.extra_rdoc_files = [
|
15
|
-
"README.markdown"
|
16
|
-
]
|
17
14
|
s.files = [
|
18
15
|
".autotest",
|
19
16
|
".gitignore",
|
20
17
|
"History.txt",
|
21
|
-
"README.markdown",
|
22
18
|
"Rakefile",
|
19
|
+
"Readme.md",
|
23
20
|
"VERSION",
|
24
21
|
"articles/getting_started_with_autotest.html",
|
25
22
|
"autotest.gemspec",
|
data/bin/autotest
CHANGED
@@ -18,6 +18,9 @@ BANNER
|
|
18
18
|
opts.on("-r", "--rc CONFIG", String, "Path to config file. (Defaults to ~/.autotest or current_dir/.autotest)") do |opt|
|
19
19
|
options[:rc] = opt
|
20
20
|
end
|
21
|
+
opts.on("-s", "--style STYLE", "Which style to use, e.g. rspec, rspec2") do |style|
|
22
|
+
options[:style] = style
|
23
|
+
end
|
21
24
|
opts.on("-h", "--help","Show this.") { puts opts;exit }
|
22
25
|
end.parse!
|
23
26
|
|
@@ -40,9 +43,9 @@ require 'autotest'
|
|
40
43
|
|
41
44
|
Autotest.options.merge!(options)
|
42
45
|
target = Autotest
|
43
|
-
style = Autotest.autodiscover
|
46
|
+
style = (options[:style] ? [options[:style]] : Autotest.autodiscover)
|
44
47
|
|
45
|
-
unless style.empty?
|
48
|
+
unless style.empty?
|
46
49
|
mod = "autotest/#{style.join("_")}"
|
47
50
|
puts "loading #{mod}" unless options[:quiet]
|
48
51
|
begin
|
@@ -77,6 +77,11 @@ class TestAutotestIntegration < Test::Unit::TestCase
|
|
77
77
|
write('test/test_a x.rb', "print 'YES'")
|
78
78
|
assert_match %r{YES}, run_autotest
|
79
79
|
end
|
80
|
+
|
81
|
+
should 'use given style' do
|
82
|
+
write('spec/a_spec.rb', "print 'YES'")
|
83
|
+
assert_match %r{YES}, run_autotest('--style rspec2')
|
84
|
+
end
|
80
85
|
end
|
81
86
|
end
|
82
87
|
end
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 4
|
7
7
|
- 4
|
8
|
-
-
|
9
|
-
version: 4.4.
|
8
|
+
- 2
|
9
|
+
version: 4.4.2
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Ryan Davis
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2010-
|
17
|
+
date: 2010-11-02 00:00:00 +01:00
|
18
18
|
default_executable:
|
19
19
|
dependencies: []
|
20
20
|
|
@@ -25,14 +25,14 @@ executables:
|
|
25
25
|
- unit_diff
|
26
26
|
extensions: []
|
27
27
|
|
28
|
-
extra_rdoc_files:
|
29
|
-
|
28
|
+
extra_rdoc_files: []
|
29
|
+
|
30
30
|
files:
|
31
31
|
- .autotest
|
32
32
|
- .gitignore
|
33
33
|
- History.txt
|
34
|
-
- README.markdown
|
35
34
|
- Rakefile
|
35
|
+
- Readme.md
|
36
36
|
- VERSION
|
37
37
|
- articles/getting_started_with_autotest.html
|
38
38
|
- autotest.gemspec
|