minitest-autotest 1.0.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 17e66e16b9ed0fa2326777f2b2fc4122f33b6799
4
- data.tar.gz: d27fdd1ebf4221ba8fd92acd722b9d84d3466b2c
3
+ metadata.gz: 4abe5bd1e76ba0e6889743b8d1d3e75349b5d389
4
+ data.tar.gz: 14891a3fad60ced3851809990ab9d1c713875da1
5
5
  SHA512:
6
- metadata.gz: fd19d6477c867659ccfe12e0ee18d5bb755513b332a52d12df3a79f8bd5d90115bda8075bb1a67d325b8c5eca3c8fb0800baac3321837792b406535f74123fd2
7
- data.tar.gz: e285162218e4b39b8fbba9591bd20e54c098502d063c7eb4bac7466f38c3be9a1add14d3977df815608d0d517fcabd199121222d0fa75a3216619ae36236c686
6
+ metadata.gz: 951382f6a32d30c4cfd29e50432a36d6c354dcbc43a4419c18becc353e3e92ba45e2301766a2b24ecf08dfe66aa33ad38c8cc550661caf13eeebf401b6b9e985
7
+ data.tar.gz: 49b014e9921b810c3706c28613dc2ecf713d53265d2de0285c0aa610c05ce307382f12347d121fbe17dd27e1abbd15d16158a3a0fa5af023990467eb8509e5c8
Binary file
data.tar.gz.sig CHANGED
Binary file
@@ -1,3 +1,10 @@
1
+ === 1.0.1 / 2015-04-13
2
+
3
+ * 2 bug fixes:
4
+
5
+ * Default died hook needs to be last. (bhenderson)
6
+ * Remove unused hooks (some may come back at some point). (bhenderson)
7
+
1
8
  === 1.0.0 / 2014-12-30
2
9
 
3
10
  * 1 bug fix:
@@ -5,19 +5,83 @@ rdoc :: http://docs.seattlerb.org/minitest-autotest
5
5
 
6
6
  == DESCRIPTION:
7
7
 
8
- FIX (describe your package)
8
+ autotest is a continous testing facility meant to be used during
9
+ development. As soon as you save a file, autotest will run the
10
+ corresponding dependent tests.
11
+
12
+ minitest-autotest is the latest incarnation of the venerable and wise
13
+ autotest. This time, it talks to minitest via minitest-server. As a
14
+ result, there is no output parsing. There are no regexps to tweak.
15
+ There's no cruft or overhead.
9
16
 
10
17
  == FEATURES/PROBLEMS:
11
18
 
12
- * FIX (list of features or problems)
19
+ * Continually and intelligently test only those files you change with autotest.
13
20
 
14
21
  == SYNOPSIS:
15
22
 
16
- FIX (code sample of usage)
23
+ % autotest
24
+ # ... tests run ...
25
+
26
+ == AUTOTEST TIPS
27
+
28
+ Setting up your project with a custom setup is easily done by creating
29
+ a ".autotest" file in your project. Here is an example of adding some
30
+ plugins, using minitest as your test library, and running rcov on full
31
+ passes:
32
+
33
+ require 'autotest/restart'
34
+
35
+ Autotest.add_hook :initialize do |at|
36
+ at.testlib = "minitest/autorun"
37
+ end
38
+
39
+ Autotest.add_hook :all_good do |at|
40
+ system "rake rcov_info"
41
+ end if ENV['RCOV']
42
+
43
+ Do note, since minitest ships with ruby19, if you want to use the
44
+ latest minitest gem you need to ensure that the gem activation occurs!
45
+ To do this, add the gem activation and the proper require to a
46
+ separate file (like ".minitest.rb" or even a test helper if you have
47
+ one) and use that for your testlib instead:
48
+
49
+ .minitest.rb:
50
+
51
+ gem "minitest"
52
+ require "minitest/autorun"
53
+
54
+ .autotest:
55
+
56
+ Autotest.add_hook :initialize do |at|
57
+ at.testlib = ".minitest"
58
+ end
59
+
60
+ If you prefer to suffix test files with "_test.rb" (instead of the
61
+ default which prefixes test files with "test_") you can change the
62
+ mapping by installing the autotest-suffix plugin. To do this first
63
+ install the autotest-suffix gem:
64
+
65
+ $ gem install autotest-suffix
66
+
67
+ Then add the following to the ".autotest" file:
68
+
69
+ require "autotest/suffix"
70
+
71
+ If you prefer minitest/spec to minitest/unit, you can still use autotest
72
+ by installing the autotest-spec plugin.
73
+ To do this first install the autotest-spec gem:
74
+
75
+ $ gem install autotest-spec
76
+
77
+ Then add the following to the ".autotest" file:
78
+
79
+ require "autotest/spec"
17
80
 
18
81
  == REQUIREMENTS:
19
82
 
20
- * FIX (list of requirements)
83
+ * minitest 5+
84
+ * minitest-server
21
85
 
22
86
  == INSTALL:
23
87
 
@@ -60,9 +60,9 @@ class Autotest
60
60
 
61
61
  T0 = Time.at 0
62
62
 
63
- ALL_HOOKS = [ :all_good, :died, :green, :initialize,
64
- :post_initialize, :interrupt, :quit, :ran_command,
65
- :red, :reset, :run_command, :updated, :waiting ]
63
+ ALL_HOOKS = [ :all_good, :died, :initialize, :post_initialize,
64
+ :interrupt, :quit, :ran_command, :reset,
65
+ :run_command, :updated, :waiting ]
66
66
 
67
67
  def self.options
68
68
  @@options ||= {}
@@ -260,7 +260,11 @@ class Autotest
260
260
  hook :quit
261
261
  puts
262
262
  rescue Exception => err
263
- hook(:died, err) or raise err
263
+ hook(:died, err) or (
264
+ warn "Unhandled exception: #{err}"
265
+ warn err.backtrace.join("\n ")
266
+ warn "Quitting"
267
+ )
264
268
  ensure
265
269
  Minitest::Server.stop
266
270
  end
@@ -704,12 +708,6 @@ class Autotest
704
708
  HOOKS[name] << block
705
709
  end
706
710
 
707
- add_hook :died do |at, err|
708
- warn "Unhandled exception: #{err}"
709
- warn err.backtrace.join("\n ")
710
- warn "Quitting"
711
- end
712
-
713
711
  ############################################################
714
712
  # Server Methods:
715
713
 
@@ -1,5 +1,5 @@
1
1
  module Minitest; end
2
2
 
3
3
  class Minitest::Autotest
4
- VERSION = "1.0.0"
4
+ VERSION = "1.0.1"
5
5
  end
@@ -1,15 +1,21 @@
1
1
  require "minitest/autorun"
2
2
 
3
3
  class FooTest < Minitest::Test
4
- def test_passes
4
+ def test_pass
5
5
  assert true
6
6
  end
7
7
 
8
- def test_fails
9
- flunk
8
+ def test_skip
9
+ skip "nope"
10
10
  end
11
11
 
12
- def test_error
13
- raise
12
+ if ENV["BAD"] then # allows it to pass my CI but easy to demo
13
+ def test_fail
14
+ flunk "write tests or I will kneecap you"
15
+ end
16
+
17
+ def test_error
18
+ raise "nope"
19
+ end
14
20
  end
15
21
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: minitest-autotest
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
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: 2014-12-31 00:00:00.000000000 Z
32
+ date: 2015-04-13 00:00:00.000000000 Z
33
33
  dependencies:
34
34
  - !ruby/object:Gem::Dependency
35
35
  name: minitest-server
@@ -51,14 +51,14 @@ dependencies:
51
51
  requirements:
52
52
  - - ~>
53
53
  - !ruby/object:Gem::Version
54
- version: '5.5'
54
+ version: '5.6'
55
55
  type: :development
56
56
  prerelease: false
57
57
  version_requirements: !ruby/object:Gem::Requirement
58
58
  requirements:
59
59
  - - ~>
60
60
  - !ruby/object:Gem::Version
61
- version: '5.5'
61
+ version: '5.6'
62
62
  - !ruby/object:Gem::Dependency
63
63
  name: rdoc
64
64
  requirement: !ruby/object:Gem::Requirement
@@ -87,7 +87,15 @@ dependencies:
87
87
  - - ~>
88
88
  - !ruby/object:Gem::Version
89
89
  version: '3.13'
90
- description: FIX (describe your package)
90
+ description: |-
91
+ autotest is a continous testing facility meant to be used during
92
+ development. As soon as you save a file, autotest will run the
93
+ corresponding dependent tests.
94
+
95
+ minitest-autotest is the latest incarnation of the venerable and wise
96
+ autotest. This time, it talks to minitest via minitest-server. As a
97
+ result, there is no output parsing. There are no regexps to tweak.
98
+ There's no cruft or overhead.
91
99
  email:
92
100
  - ryand-ruby@zenspider.com
93
101
  executables:
@@ -142,10 +150,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
142
150
  version: '0'
143
151
  requirements: []
144
152
  rubyforge_project:
145
- rubygems_version: 2.4.1
153
+ rubygems_version: 2.4.5
146
154
  signing_key:
147
155
  specification_version: 4
148
- summary: FIX (describe your package)
149
- test_files:
150
- - test/test_minitest/test_autorun.rb
151
- - test/test_minitest/test_good.rb
156
+ summary: autotest is a continous testing facility meant to be used during development
157
+ test_files: []
metadata.gz.sig CHANGED
Binary file