parallel_tests 0.6.12 → 0.6.13

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.6.12
1
+ 0.6.13
@@ -18,6 +18,7 @@ class ParallelSpecs::SpecRuntimeLogger < ParallelSpecs::SpecLoggerBase
18
18
  def dump_summary(*args);end
19
19
  def dump_failures(*args);end
20
20
  def dump_failure(*args);end
21
+ def dump_pending(*args);end
21
22
 
22
23
  def start_dump(*args)
23
24
  return unless ENV['TEST_ENV_NUMBER'] #only record when running in parallel
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "parallel_tests"
8
- s.version = "0.6.12"
8
+ s.version = "0.6.13"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Michael Grosser"]
12
- s.date = "2011-12-14"
12
+ s.date = "2011-12-22"
13
13
  s.email = "grosser.michael@gmail.com"
14
14
  s.executables = ["parallel_cucumber", "parallel_spec", "parallel_test"]
15
15
  s.files = [
@@ -4,13 +4,14 @@ describe ParallelSpecs::SpecRuntimeLogger do
4
4
  before do
5
5
  # pretend we run in parallel or the logger will log nothing
6
6
  ENV['TEST_ENV_NUMBER'] = ''
7
+ @clean_output = %r{^spec/foo.rb:[-\.e\d]+$}m
7
8
  end
8
9
 
9
10
  after do
10
11
  ENV.delete 'TEST_ENV_NUMBER'
11
12
  end
12
13
 
13
- def log_for_a_file
14
+ def log_for_a_file(options={})
14
15
  Tempfile.open('xxx') do |temp|
15
16
  temp.close
16
17
  f = File.open(temp.path,'w')
@@ -23,6 +24,14 @@ describe ParallelSpecs::SpecRuntimeLogger do
23
24
  example = (mock(:location => "#{Dir.pwd}/spec/foo.rb:123"))
24
25
  logger.example_started example
25
26
  logger.example_passed example
27
+ if options[:pending]
28
+ logger.example_pending example
29
+ logger.dump_pending
30
+ end
31
+ if options[:failed]
32
+ logger.example_failed example
33
+ logger.dump_failures
34
+ end
26
35
  logger.start_dump
27
36
 
28
37
  #f.close
@@ -31,12 +40,20 @@ describe ParallelSpecs::SpecRuntimeLogger do
31
40
  end
32
41
 
33
42
  it "logs runtime with relative paths" do
34
- log_for_a_file.should =~ %r{^spec/foo.rb:[-\.e\d]+$}m
43
+ log_for_a_file.should =~ @clean_output
44
+ end
45
+
46
+ it "does not log pending" do
47
+ log_for_a_file(:pending => true).should =~ @clean_output
48
+ end
49
+
50
+ it "does not log failures" do
51
+ log_for_a_file(:failed => true).should =~ @clean_output
35
52
  end
36
53
 
37
54
  it "does not log if we do not run in parallel" do
38
55
  ENV.delete 'TEST_ENV_NUMBER'
39
- log_for_a_file.should == ''
56
+ log_for_a_file.should == ""
40
57
  end
41
58
 
42
59
  it "appends to a given file" do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: parallel_tests
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.12
4
+ version: 0.6.13
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: 2011-12-14 00:00:00.000000000 Z
12
+ date: 2011-12-22 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: parallel
16
- requirement: &78880400 !ruby/object:Gem::Requirement
16
+ requirement: &84775920 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,7 +21,7 @@ dependencies:
21
21
  version: '0'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *78880400
24
+ version_requirements: *84775920
25
25
  description:
26
26
  email: grosser.michael@gmail.com
27
27
  executables:
@@ -74,7 +74,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
74
74
  version: '0'
75
75
  segments:
76
76
  - 0
77
- hash: -636115267
77
+ hash: -699231853
78
78
  required_rubygems_version: !ruby/object:Gem::Requirement
79
79
  none: false
80
80
  requirements: