ruby-testrail 1.2.2 → 1.3.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- Njc1MTYzZmViY2Q1NmEzMWZjMDJjNzFjNzc3MDNiOTIzODMxNDAzMw==
4
+ NzE1MmJmMjg4ZTFhZWFmNDU3MTFjZmUzMTUyMDNhOTM5YmY0MGI5ZA==
5
5
  data.tar.gz: !binary |-
6
- NTc3MjU2MzU4ZmI1YmU0MjQxZDY4OGE3NzYwMWVlYmM3OTAyNzI5Mg==
6
+ MGE4NDZlMTczZmQyMzVmMjIxMTBjNjc0NDY3MjMxMjY1NzRmZTNiMg==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- YjgxYWVjN2VlNmIzZWZmNDljNWE4OGVkOTQ1YWM0NjlhYTljYWVlYmJjNTZj
10
- ODk4NDEzOWI3ZTZjYWZlMjY5NzIyOGM0MDlkZTM0ZDBmZWFmNDg4MjkxODMz
11
- M2FlYmRjMjAzN2UyOTBkZWI5ZDE1MDFiMTY0Y2E1MjhkY2E2MjI=
9
+ MmY0NDkyMzRiNWE0YzA0YTViYjk5NDFiMGFkY2QwOWVjZjQ5MTg3ZjE1MzIw
10
+ ZWUyYzg2Mjc4MGY0NmI1MTdjNDgwZDFiOGUwZTFlOGMyMGM5YWZhMWQyZmQz
11
+ MWU2YjZjNjU5OTYwZDI2YTQwY2E1OGI5YjAwOWNlNTYyNDdlYTQ=
12
12
  data.tar.gz: !binary |-
13
- YjkyZjRkYjljNjBlM2U4MWZhMTdlZTc0YjhiZjc5NDhlZjM5YzM3NjNiYWFl
14
- NmQ4ZjRjYTY2ZDIyZGVmMDI1NzdiODgyZjI2N2ExYWU0Zjc0YWJhMDJlM2Jm
15
- YzVlZjg4M2VmZWQ2M2M0NWI2NmI3MTI5NDZlNWQ1MjU0NDk4NjY=
13
+ MTJlYWIyZmJhNDUzMzAyZmE2ODNhMDVlNDczYTI1M2M2NGE2N2JiYjRjYmU5
14
+ ZDAzOWJjYWU2YjM3YWVlMTY1NzM2OWRkN2MwODVlMGEwMGRjZWYwYmNjMjQy
15
+ MmVlNzM3NGRkZTM5ZTEyN2ViNjc4ODJlZWE3YjVlZDgxM2U3YzY=
@@ -39,14 +39,17 @@ def create_test_result(type, test_case_result: true)
39
39
  @test_case_section = 'test_case_section'
40
40
  @test_case_name = 'test_case_name'
41
41
  @test_case_comment = 'test_case_comment'
42
+ @example_name = nil
42
43
 
43
44
  case type
44
45
  when 'Cucumber Scenario Outline'
45
46
  class_name = 'Cucumber::RunningTestCase::ScenarioOutlineExample'
46
47
  scenario_outline = double('scenario_outline')
47
48
  feature = double('feature')
49
+ @example_name = 'example_name'
48
50
 
49
51
  allow(test_result).to receive(:scenario_outline) { scenario_outline }
52
+ allow(test_result).to receive(:name) { @example_name }
50
53
  allow(test_result).to receive(:failed?) { !test_case_result }
51
54
  allow(test_result).to receive(:exception) { @test_case_comment }
52
55
  allow(scenario_outline).to receive(:feature) { feature }
@@ -143,9 +146,10 @@ end
143
146
 
144
147
  Then(/^the submitted results contains the provided details/) do
145
148
  expect(@test_run).to have_received(:submit_results)
149
+
146
150
  expect(@test_run).to have_received(:add_test_result).with({
147
151
  section_name: @test_case_section,
148
- test_name: @test_case_name,
152
+ test_name: @example_name.nil? ? @test_case_name : "#{@test_case_name} #{@example_name}",
149
153
  success: true,
150
154
  comment: @test_case_comment
151
155
  })
@@ -25,21 +25,20 @@ module TestRail
25
25
  case scenario.class.name
26
26
  when 'Cucumber::RunningTestCase::ScenarioOutlineExample'
27
27
  test_results = resolve_from_scenario_outline(scenario)
28
- when 'Cucumber::Ast::ScenarioOutline'
28
+ when 'Cucumber::Ast::OutlineTable::ExampleRow'
29
29
  test_results = resolve_from_scenario_outline(scenario)
30
30
  when 'Cucumber::RunningTestCase::Scenario'
31
31
  test_results = resolve_from_simple_scenario(scenario)
32
32
  when 'Cucumber::Ast::Scenario'
33
33
  test_results = resolve_from_simple_scenario(scenario)
34
34
  end
35
-
36
35
  submit_test_result(test_results)
37
36
  end
38
37
 
39
38
  def resolve_from_scenario_outline(scenario)
40
39
  {
41
40
  section_name: scenario.scenario_outline.feature.name.strip,
42
- test_name: scenario.scenario_outline.name.strip,
41
+ test_name: "#{scenario.scenario_outline.name.strip} #{scenario.name.strip}",
43
42
  success: !scenario.failed?,
44
43
  comment: scenario.exception
45
44
  }
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |spec|
2
2
  spec.name = 'ruby-testrail'
3
- spec.version = '1.2.2'
3
+ spec.version = '1.3.2'
4
4
  spec.date = '2016-04-26'
5
5
  spec.summary = 'Ruby TestRail integration with RSpec and Cucumber Test Suites'
6
6
  spec.description = 'Library to integrate Test Suite with TestRail'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby-testrail
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.2
4
+ version: 1.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Javier Durante