res 1.1.0.pre → 1.1.0.pre2

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: b731804b20181480f549059eeac6337968d79bd1
4
- data.tar.gz: 62d01690d6f05bcb121c3c62dc9242a7ad1b9e08
3
+ metadata.gz: c42e81948be748fac40ccc5af1b4ef6fbdc73981
4
+ data.tar.gz: 86443f1069f5e84aea04bad85061136f61863430
5
5
  SHA512:
6
- metadata.gz: d2a33ffd4cb61a2905bcf0b21826d3f5fd5cedbf2f47a97eea6208f804591a57b61b7c39153fa1066ab66806a507f1dcc3b75737b1c2bf95efff9ed43108deaa
7
- data.tar.gz: 475f54415d79992efaa03a5be29e644e91d6d13fd661437b111033457ae845ddb91cbbf576fba040c74919a04cd6e933a8d13fd01c0781192505c1533938ef9f
6
+ metadata.gz: 00ebad5cf8582e2e16c1350f8428618d494e7b9a4a2a908e2d1d660564a285c15ad8184267de4c46568002b2423acdb572b65dc4ef6649e880bc8976f129a5ad
7
+ data.tar.gz: 365367e6f592b8e26fa838d5ebaaeb105e65ee73ef15e514e511c8dbb9ed7a9626e10c9e303c85b477139366882799100608de73dcfebdfe3c1e52a90854ade3
data/README.md CHANGED
@@ -31,6 +31,10 @@ You can dump a Res IR results file using a cucumber formatter or parse xunit out
31
31
  cucumber -f pretty -f Res::Formatters::RubyCucumber -o './cucumber.res'
32
32
  Note: This cucumber formatter works for cucumber version < 2.0
33
33
 
34
+ ## Rspec
35
+
36
+ rspec -f Res::Formatters::Rspec -o ./rspec.res
37
+
34
38
  ## Junit
35
39
 
36
40
  ./bin/res.rb --junit '/path/to/xunit_result.xml'
data/lib/res/mappings.rb CHANGED
@@ -16,8 +16,11 @@ module Res
16
16
  when "Cucumber"
17
17
  @context = ["Cucumber::Feature", "Cucumber::ScenarioOutline"]
18
18
  @case = ["Cucumber::Scenario"]
19
+ when "Rspec"
20
+ @context = ["Rspec::Describe"]
21
+ @case = ["Rspec::Test"]
19
22
  end
20
23
  end
21
24
 
22
25
  end
23
- end
26
+ end
@@ -30,8 +30,8 @@ module Res
30
30
  end # initialize
31
31
 
32
32
  # Creates a new suite within testrail
33
- def sync_tests(args)
34
- @ir = args[:ir]
33
+ def sync_tests(ir)
34
+ @ir = ir
35
35
  @mappings = Res::Mappings.new(@ir.type)
36
36
 
37
37
  suite = @project.find_or_create_suite(:name => @suite_name, :id => @project.id)
@@ -49,8 +49,8 @@ module Res
49
49
 
50
50
  # Submits run against suite
51
51
  # Either creates a new run using run_name or use existing run_id
52
- def submit_results(args = {})
53
- sync_tests(args) if !@synced
52
+ def submit_results(ir, args = {})
53
+ sync_tests(ir) if !@synced
54
54
  suite = @project.find_suite(:name => @suite_name)
55
55
 
56
56
  run_name = @config.run_name || args[:run_name] || nil
@@ -14,7 +14,7 @@ module Res
14
14
  config.process(args)
15
15
  end
16
16
 
17
- def submit_results(ir, args)
17
+ def submit_results(ir, args = nil)
18
18
  # Set missing project information
19
19
  ir.project = config.project
20
20
  ir.suite = config.suite
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: res
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0.pre
4
+ version: 1.1.0.pre2
5
5
  platform: ruby
6
6
  authors:
7
7
  - BBC
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2015-11-03 00:00:00.000000000 Z
13
+ date: 2015-11-18 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: json
@@ -54,6 +54,20 @@ dependencies:
54
54
  - - "~>"
55
55
  - !ruby/object:Gem::Version
56
56
  version: '2.2'
57
+ - !ruby/object:Gem::Dependency
58
+ name: hive-messages
59
+ requirement: !ruby/object:Gem::Requirement
60
+ requirements:
61
+ - - "~>"
62
+ - !ruby/object:Gem::Version
63
+ version: '1'
64
+ type: :runtime
65
+ prerelease: false
66
+ version_requirements: !ruby/object:Gem::Requirement
67
+ requirements:
68
+ - - "~>"
69
+ - !ruby/object:Gem::Version
70
+ version: '1'
57
71
  - !ruby/object:Gem::Dependency
58
72
  name: rspec
59
73
  requirement: !ruby/object:Gem::Requirement