cutest 0.0.1 → 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (4) hide show
  1. data/README.markdown +4 -4
  2. data/cutest.gemspec +1 -1
  3. data/lib/cutest.rb +3 -3
  4. metadata +3 -3
data/README.markdown CHANGED
@@ -8,10 +8,10 @@ Description
8
8
 
9
9
  Run tests in separate processes to avoid shared state.
10
10
 
11
- Each test file is loaded in a forked process and inside an anonymous
12
- module. Once a failure is found in a file, the rest of the file is
13
- skipped and the error is reported. This way, running your test suite
14
- feels faster.
11
+ Each test file is loaded in a forked process and, if the second
12
+ parameter to `Cutest.run` is true, inside an anonymous module. Once a
13
+ failure is found in a file, the rest of the file is skipped and the
14
+ error is reported. This way, running your test suite feels faster.
15
15
 
16
16
  There are no nested contexts, just the `setup` and `test` methods.
17
17
  Unlike other testing tools, the result of evaluating the setup is
data/cutest.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = "cutest"
3
- s.version = "0.0.1"
3
+ s.version = "0.0.2"
4
4
  s.summary = "Forking tests."
5
5
  s.description = "Run tests in separate processes to avoid shared state."
6
6
  s.authors = ["Damian Janowski", "Michel Martens"]
data/lib/cutest.rb CHANGED
@@ -28,7 +28,7 @@ def test(name = nil, &block)
28
28
  end
29
29
 
30
30
  class Cutest < Batch
31
- VERSION = "0.0.1"
31
+ VERSION = "0.0.2"
32
32
 
33
33
  def report_errors
34
34
  return if @errors.empty?
@@ -40,7 +40,7 @@ class Cutest < Batch
40
40
  end
41
41
  end
42
42
 
43
- def self.run(files)
43
+ def self.run(files, anonymous = false)
44
44
  each(files) do |file|
45
45
  read, write = IO.pipe
46
46
 
@@ -48,7 +48,7 @@ class Cutest < Batch
48
48
  read.close
49
49
 
50
50
  begin
51
- load(file, true)
51
+ load(file, anonymous)
52
52
  rescue => e
53
53
  error = [e.message] + e.backtrace.take_while { |line| !line.start_with?(__FILE__) }
54
54
  write.write error.join("\n")
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 0
8
- - 1
9
- version: 0.0.1
8
+ - 2
9
+ version: 0.0.2
10
10
  platform: ruby
11
11
  authors:
12
12
  - Damian Janowski
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-09-10 00:00:00 -03:00
18
+ date: 2010-09-11 00:00:00 -03:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency