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 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
- This is a fork of the ZenTest package to extract autotest from it.
3
+ (Extracted from ZenTest)
4
4
 
5
5
  Improvements over ZenTest
6
6
  =========================
7
- - possibility to not run all tests after a failed test passes
8
- - possibility to use alternative config file
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 flying around
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 Path to config file. (Defaults to ~/.autotest or current_dir/.autotest)
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
1
+ 4.4.2
@@ -5,21 +5,18 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{autotest}
8
- s.version = "4.4.1"
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-10-02}
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",
@@ -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? then
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
- - 1
9
- version: 4.4.1
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-10-02 00:00:00 +02:00
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
- - README.markdown
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