rspec_junit 2.0.1 → 3.0.0

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: 214e6ae9e73eb1baf0856d302bb3f25b1475877e
4
- data.tar.gz: 02f75a698528a9e0b6bb996cc0213f8a35e8abcb
3
+ metadata.gz: 0e8c08054a0d713c9923eb1efcbd44835e99d1bd
4
+ data.tar.gz: 4549415dd031f78f3ea15835ec586f160bbcd153
5
5
  SHA512:
6
- metadata.gz: bd445ea540b375b650eaf96755041d1677b586b455f2e09c280dc310504f5f887d23b4a21afbfd952b30c94af1e1cc223d8a68bef757a2b4705548c3261f1dbb
7
- data.tar.gz: 8b7535eba7d718caffe695e2c22c4988d70ec7a7e207cfc448ded0b3b0e702dbac8ee1e9a3c9afa889e6f79b5518e1e2f8b3437a8fb176e116e5a5d9269c7135
6
+ metadata.gz: f571e6699163d5468bd9e4344d9bb4e329353f3f0036f1592e7329cdd36c04be546f83e154a299fa4652e479a916f2718afb43e19302cd19afab70f876ba5ed3
7
+ data.tar.gz: b8845a4aeadc906ac4e1f6a6680a0776b351697853063a83730ff1c8e71cff704c6c07ea7f7445ef36b6adc3fa6921a4433576101c326481736fac0b21a3a090
data/.coveralls.yml ADDED
@@ -0,0 +1 @@
1
+ service_name: travis-ci
data/.travis.yml CHANGED
@@ -1,9 +1,8 @@
1
1
  language: ruby
2
+ cache: bundler
2
3
  rvm:
3
4
  - 2.2
4
- - 2.1
5
- - 2.0
6
5
  notifications:
7
6
  email:
8
7
  on_success: never
9
- on_failure: never
8
+ on_failure: never
data/README.md CHANGED
@@ -1,4 +1,7 @@
1
- # rspec_junit [![Gem Version](https://badge.fury.io/rb/rspec_junit.svg)](https://rubygems.org/gems/rspec_junit)[![Build Status](https://travis-ci.org/bootstraponline/rspec_junit.svg)](https://travis-ci.org/bootstraponline/rspec_junit)[![Dependency Status](https://gemnasium.com/bootstraponline/rspec_junit.svg)](https://gemnasium.com/bootstraponline/rspec_junit)
1
+ # rspec_junit
2
+ [![Gem Version](https://badge.fury.io/rb/rspec_junit.svg)](https://rubygems.org/gems/rspec_junit)
3
+ [![Build Status](https://travis-ci.org/bootstraponline/rspec_junit.svg)](https://travis-ci.org/bootstraponline/rspec_junit)[![Dependency Status](https://gemnasium.com/bootstraponline/rspec_junit.svg)](https://gemnasium.com/bootstraponline/rspec_junit)
4
+ [![Coverage Status](https://coveralls.io/repos/bootstraponline/rspec_junit/badge.svg?nocache2)](https://coveralls.io/r/bootstraponline/rspec_junit)
2
5
 
3
6
  A fork of [yarjuf](https://github.com/natritmeyer/yarjuf) containing additional features and bug fixes.
4
7
  Another popular junit formatter is [rspec_junit_formatter](https://github.com/sj26/rspec_junit_formatter).
@@ -8,10 +11,12 @@ Another popular junit formatter is [rspec_junit_formatter](https://github.com/sj
8
11
  Changes from upstream:
9
12
 
10
13
  - [Record location information](https://github.com/natritmeyer/yarjuf/pull/18) for per file performance measurement
11
-
14
+ - Coveralls setup on Travis CI (100% coverage)
15
+ - Renamed to rspec_junit instead of yarjuf
16
+
12
17
  Usage:
13
18
 
14
- - `require 'yarjuf'`
19
+ - `require 'rspec_junit'`
15
20
 
16
21
  --
17
22
 
@@ -27,22 +32,22 @@ distributable as a gem. Thus: [yet-another-rspec-junit-formatter](https://github
27
32
 
28
33
  Using rubygems:
29
34
 
30
- `gem install yarjuf`
35
+ `gem install rspec_junit`
31
36
 
32
37
  Using bundler:
33
38
 
34
39
  Add the following line to your `Gemfile`:
35
40
 
36
- `gem 'yarjuf'`
41
+ `gem 'rspec_junit'`
37
42
 
38
43
  ## Usage
39
44
 
40
45
  There are a few ways to use custom formatters in RSpec; what follows is
41
46
  the 'best' way...
42
47
 
43
- ### Loading yarjuf
48
+ ### Loading rspec_junit
44
49
 
45
- Before you can use yarjuf, RSpec needs to know about it. The best way to
50
+ Before you can use rspec_junit, RSpec needs to know about it. The best way to
46
51
  do that is to use the functionality that RSpec provides to load
47
52
  libraries.
48
53
 
@@ -62,16 +67,16 @@ required when RSpec starts.
62
67
  Add the following to your `spec/spec_helper.rb`:
63
68
 
64
69
  ```ruby
65
- require 'yarjuf'
70
+ require 'rspec_junit'
66
71
  ```
67
72
 
68
- That will make sure that yarjuf is loaded when RSpec starts and can be
73
+ That will make sure that rspec_junit is loaded when RSpec starts and can be
69
74
  used as a formatter.
70
75
 
71
- ### Generating JUnit output using yarjuf
76
+ ### Generating JUnit output using rspec_junit
72
77
 
73
78
  RSpec tests can be executed in a number of ways. Here's how to get JUnit
74
- output for each of those different ways - assuming you've loaded yarjuf
79
+ output for each of those different ways - assuming you've loaded rspec_junit
75
80
  as specified above).
76
81
 
77
82
  #### Running rspec tests from the command line
@@ -100,7 +105,7 @@ That will write out JUnit formatted results to a file called
100
105
 
101
106
  #### Jenkins integration
102
107
 
103
- To use yarjuf with Jenkins(/Hudson), simply tick the 'Publish JUnit test
108
+ To use rspec_junit with Jenkins(/Hudson), simply tick the 'Publish JUnit test
104
109
  result report' option in the Jenkins task configuration page and in the
105
110
  'Test report XMLs' field specify the file name that you expect the JUnit
106
111
  formatted results to be written to, ie: the file path and name specified
data/Rakefile CHANGED
@@ -1,6 +1,8 @@
1
1
  require 'bundler/gem_tasks'
2
2
  require 'cucumber/rake/task'
3
3
  require 'rspec/core/rake_task'
4
+ require 'coveralls/rake/task'
5
+ Coveralls::RakeTask.new
4
6
 
5
7
  namespace :cuke do
6
8
  Cucumber::Rake::Task.new(:all) do |t|
@@ -19,5 +21,5 @@ namespace :spec do
19
21
  end
20
22
  end
21
23
 
22
- task :default => ['spec:all', 'cuke:all']
24
+ task :default => ['spec:all', 'cuke:all', 'coveralls:push']
23
25
 
@@ -14,11 +14,11 @@ Feature: Basic use of Yarjuf
14
14
  """
15
15
 
16
16
  Scenario: Requiring Yarjuf
17
- When I run `rspec spec/basic_spec.rb -r ../../lib/yarjuf -f JUnit`
17
+ When I run `rspec spec/basic_spec.rb -r ../../lib/rspec_junit -f JUnit`
18
18
  Then the exit status should be 0
19
19
 
20
20
  Scenario: Writing output to a file
21
- When I run `rspec spec/basic_spec.rb -r ../../lib/yarjuf -f JUnit -o results.xml`
21
+ When I run `rspec spec/basic_spec.rb -r ../../lib/rspec_junit -f JUnit -o results.xml`
22
22
  Then the exit status should be 0
23
23
  And a file named "results.xml" should exist
24
24
 
@@ -20,7 +20,7 @@ Feature: Individual suites
20
20
  end
21
21
  end
22
22
  """
23
- When I run `rspec spec/suite_one_spec.rb spec/suite_two_spec.rb -r ../../lib/yarjuf -f JUnit -o results.xml`
23
+ When I run `rspec spec/suite_one_spec.rb spec/suite_two_spec.rb -r ../../lib/rspec_junit -f JUnit -o results.xml`
24
24
  Then the junit output file contains two testsuite elements named 'suite one' and 'suite two'
25
25
  And the junit output file has one test against each suite
26
26
 
@@ -76,7 +76,7 @@ Feature: Individual suites
76
76
  end
77
77
  end
78
78
  """
79
- When I run `rspec spec/suite_one_spec.rb spec/suite_two_spec.rb -r ../../lib/yarjuf -f JUnit -o results.xml`
79
+ When I run `rspec spec/suite_one_spec.rb spec/suite_two_spec.rb -r ../../lib/rspec_junit -f JUnit -o results.xml`
80
80
  Then the junit output file contains two testsuite elements named 'suite one' and 'suite two'
81
81
  And the junit output file has the correct test counts against each suite
82
82
 
@@ -12,7 +12,7 @@ Feature: Individual Tests
12
12
  end
13
13
  end
14
14
  """
15
- When I run `rspec spec/simple_test_name_spec.rb -r ../../lib/yarjuf -f JUnit -o results.xml`
15
+ When I run `rspec spec/simple_test_name_spec.rb -r ../../lib/rspec_junit -f JUnit -o results.xml`
16
16
  Then the junit output file contains a test result with a simple name
17
17
 
18
18
  Scenario: Nested tests
@@ -32,7 +32,7 @@ Feature: Individual Tests
32
32
  end
33
33
  end
34
34
  """
35
- When I run `rspec spec/nested_spec.rb -r ../../lib/yarjuf -f JUnit -o results.xml`
35
+ When I run `rspec spec/nested_spec.rb -r ../../lib/rspec_junit -f JUnit -o results.xml`
36
36
  Then the junit output file has a nicely rendered nested test name
37
37
 
38
38
  Scenario: Test duration
@@ -44,7 +44,7 @@ Feature: Individual Tests
44
44
  end
45
45
  end
46
46
  """
47
- When I run `rspec spec/test_duration_spec.rb -r ../../lib/yarjuf -f JUnit -o results.xml`
47
+ When I run `rspec spec/test_duration_spec.rb -r ../../lib/rspec_junit -f JUnit -o results.xml`
48
48
  Then the junit output file contains a test with a duration
49
49
 
50
50
  Scenario: Pending test
@@ -57,7 +57,7 @@ Feature: Individual Tests
57
57
  end
58
58
  end
59
59
  """
60
- When I run `rspec spec/pending_test_spec.rb -r ../../lib/yarjuf -f JUnit -o results.xml`
60
+ When I run `rspec spec/pending_test_spec.rb -r ../../lib/rspec_junit -f JUnit -o results.xml`
61
61
  Then the junit output file contains a pending test
62
62
 
63
63
  Scenario: Failing test
@@ -69,6 +69,6 @@ Feature: Individual Tests
69
69
  end
70
70
  end
71
71
  """
72
- When I run `rspec spec/failing_test_spec.rb -r ../../lib/yarjuf -f JUnit -o results.xml`
72
+ When I run `rspec spec/failing_test_spec.rb -r ../../lib/rspec_junit -f JUnit -o results.xml`
73
73
  Then the junit output file contains a failing test
74
74
 
@@ -12,7 +12,7 @@ Feature: Suite Summary
12
12
  end
13
13
  end
14
14
  """
15
- When I run `rspec spec/suite_element_spec.rb -r ../../lib/yarjuf -f JUnit -o results.xml`
15
+ When I run `rspec spec/suite_element_spec.rb -r ../../lib/rspec_junit -f JUnit -o results.xml`
16
16
  Then the junit output contains the testsuite element
17
17
 
18
18
  Scenario: One passing test
@@ -24,7 +24,7 @@ Feature: Suite Summary
24
24
  end
25
25
  end
26
26
  """
27
- When I run `rspec spec/one_passing_test_spec.rb -r ../../lib/yarjuf -f JUnit -o results.xml`
27
+ When I run `rspec spec/one_passing_test_spec.rb -r ../../lib/rspec_junit -f JUnit -o results.xml`
28
28
  Then the junit output reports one passing test
29
29
 
30
30
  Scenario: One failing test
@@ -36,7 +36,7 @@ Feature: Suite Summary
36
36
  end
37
37
  end
38
38
  """
39
- When I run `rspec spec/one_failing_test_spec.rb -r ../../lib/yarjuf -f JUnit -o results.xml`
39
+ When I run `rspec spec/one_failing_test_spec.rb -r ../../lib/rspec_junit -f JUnit -o results.xml`
40
40
  Then the junit output reports one failing test
41
41
 
42
42
  Scenario: One pending test
@@ -49,7 +49,7 @@ Feature: Suite Summary
49
49
  end
50
50
  end
51
51
  """
52
- When I run `rspec spec/one_pending_test_spec.rb -r ../../lib/yarjuf -f JUnit -o results.xml`
52
+ When I run `rspec spec/one_pending_test_spec.rb -r ../../lib/rspec_junit -f JUnit -o results.xml`
53
53
  Then the junit output reports one pending test
54
54
 
55
55
  Scenario: Test suite duration
@@ -61,7 +61,7 @@ Feature: Suite Summary
61
61
  end
62
62
  end
63
63
  """
64
- When I run `rspec spec/suite_duration_spec.rb -r ../../lib/yarjuf -f JUnit -o results.xml`
64
+ When I run `rspec spec/suite_duration_spec.rb -r ../../lib/rspec_junit -f JUnit -o results.xml`
65
65
  Then the junit output testsuite element contains a duration
66
66
 
67
67
  Scenario: Test suite time stamp
@@ -73,6 +73,6 @@ Feature: Suite Summary
73
73
  end
74
74
  end
75
75
  """
76
- When I run `rspec spec/suite_timestamp_spec.rb -r ../../lib/yarjuf -f JUnit -o results.xml`
76
+ When I run `rspec spec/suite_timestamp_spec.rb -r ../../lib/rspec_junit -f JUnit -o results.xml`
77
77
  Then the junit output testsuite element contains a timestamp
78
78
 
@@ -1,5 +1,11 @@
1
1
  require 'simplecov'
2
- SimpleCov.start
2
+ require 'coveralls'
3
+
4
+ # Omit coveralls formatter since we're merging suite results via a Rake task
5
+ # https://coveralls.zendesk.com/hc/en-us/articles/201769485-Ruby-Rails
6
+ SimpleCov.formatters = [SimpleCov::Formatter::HTMLFormatter]
7
+
8
+ SimpleCov.start { add_filter 'spec/' }
3
9
 
4
10
  require 'aruba/cucumber'
5
11
  require 'nokogiri'
File without changes
@@ -0,0 +1,3 @@
1
+ module RspecJunit
2
+ VERSION = '3.0.0'
3
+ end
@@ -1,9 +1,10 @@
1
1
  # external dependencies
2
+ require 'rubygems'
2
3
  require 'time'
3
4
  require 'builder'
4
5
  require 'rspec/core'
5
6
  require 'rspec/core/formatters'
6
7
 
7
8
  # internal dependencies
8
- require 'yarjuf/j_unit'
9
- require 'yarjuf/version'
9
+ require 'rspec_junit/junit'
10
+ require 'rspec_junit/version'
data/rspec_junit.gemspec CHANGED
@@ -1,15 +1,12 @@
1
- # -*- encoding: utf-8 -*-
2
- lib = File.expand_path('../lib', __FILE__)
3
- $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
- require 'yarjuf/version'
1
+ require_relative 'lib/rspec_junit/version'
5
2
 
6
3
  Gem::Specification.new do |gem|
7
4
  gem.name = 'rspec_junit'
8
- gem.version = Yarjuf::VERSION
5
+ gem.version = RspecJunit::VERSION
9
6
  gem.platform = Gem::Platform::RUBY
10
7
  gem.authors = ['Nat Ritmeyer', 'Ben Snape']
11
8
  gem.email = ['nat@natontesting.com']
12
- gem.homepage = 'http://github.com/natritmeyer/yarjuf'
9
+ gem.homepage = 'http://github.com/bootstraponline/rspec_junit'
13
10
  gem.summary = 'Yet Another RSpec JUnit Formatter (for Hudson/Jenkins)'
14
11
  gem.description = 'Yet Another RSpec JUnit Formatter (for Hudson/Jenkins)'
15
12
 
@@ -25,7 +22,7 @@ Gem::Specification.new do |gem|
25
22
  gem.add_development_dependency('rake', '~> 10.3.2')
26
23
  gem.add_development_dependency('cucumber', '~> 1.3.16')
27
24
  gem.add_development_dependency('aruba', '~> 0.6.0')
28
- gem.add_development_dependency('simplecov', '~> 0.8.2') # for Ruby 1.8.7
25
+ gem.add_development_dependency('coveralls', '~> 0.8.1')
29
26
  gem.add_development_dependency('reek', ['= 1.3.7']) # for Ruby 1.8.7
30
27
  gem.add_development_dependency('rainbow', '~> 1.99.2') # for Ruby 1.8.7
31
28
  end
@@ -1,20 +1,21 @@
1
1
  describe JUnit do
2
- context "interface conformity" do
3
- subject { JUnit.new "some output" }
2
+ context 'interface conformity' do
4
3
 
5
- it "should respond to example passed" do
4
+ subject { JUnit.new 'some output' }
5
+
6
+ it 'should respond to example passed' do
6
7
  should respond_to :example_passed
7
8
  end
8
9
 
9
- it "should respond to example failed" do
10
+ it 'should respond to example failed' do
10
11
  should respond_to :example_failed
11
12
  end
12
13
 
13
- it "should respond to example pending" do
14
+ it 'should respond to example pending' do
14
15
  should respond_to :example_pending
15
16
  end
16
17
 
17
- it "should respond to dump summary" do
18
+ it 'should respond to dump summary' do
18
19
  should respond_to :dump_summary
19
20
  end
20
21
  end
data/spec/spec_helper.rb CHANGED
@@ -1,2 +1,4 @@
1
- require 'yarjuf'
1
+ require 'rubygems'
2
+ require 'rspec'
3
+ require_relative '../lib/rspec_junit'
2
4
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rspec_junit
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.1
4
+ version: 3.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nat Ritmeyer
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2015-05-10 00:00:00.000000000 Z
12
+ date: 2015-06-18 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rspec
@@ -96,19 +96,19 @@ dependencies:
96
96
  - !ruby/object:Gem::Version
97
97
  version: 0.6.0
98
98
  - !ruby/object:Gem::Dependency
99
- name: simplecov
99
+ name: coveralls
100
100
  requirement: !ruby/object:Gem::Requirement
101
101
  requirements:
102
102
  - - "~>"
103
103
  - !ruby/object:Gem::Version
104
- version: 0.8.2
104
+ version: 0.8.1
105
105
  type: :development
106
106
  prerelease: false
107
107
  version_requirements: !ruby/object:Gem::Requirement
108
108
  requirements:
109
109
  - - "~>"
110
110
  - !ruby/object:Gem::Version
111
- version: 0.8.2
111
+ version: 0.8.1
112
112
  - !ruby/object:Gem::Dependency
113
113
  name: reek
114
114
  requirement: !ruby/object:Gem::Requirement
@@ -144,6 +144,7 @@ executables: []
144
144
  extensions: []
145
145
  extra_rdoc_files: []
146
146
  files:
147
+ - ".coveralls.yml"
147
148
  - ".gitignore"
148
149
  - ".rspec"
149
150
  - ".travis.yml"
@@ -161,13 +162,13 @@ files:
161
162
  - features/step_definitions/suite_level_details_steps.rb
162
163
  - features/suite_level_details.feature
163
164
  - features/support/env.rb
164
- - lib/yarjuf.rb
165
- - lib/yarjuf/j_unit.rb
166
- - lib/yarjuf/version.rb
165
+ - lib/rspec_junit.rb
166
+ - lib/rspec_junit/junit.rb
167
+ - lib/rspec_junit/version.rb
167
168
  - rspec_junit.gemspec
168
169
  - spec/formatter_conformity_spec.rb
169
170
  - spec/spec_helper.rb
170
- homepage: http://github.com/natritmeyer/yarjuf
171
+ homepage: http://github.com/bootstraponline/rspec_junit
171
172
  licenses: []
172
173
  metadata: {}
173
174
  post_install_message:
@@ -1,3 +0,0 @@
1
- module Yarjuf
2
- VERSION = '2.0.1'
3
- end