kanoah_rspec_formatter 0.2.11 → 0.2.12

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3305a268d24f271457be255fc1bd5c7ae5db7d0a
4
- data.tar.gz: a48d05ccae119d69be5abab5496298896b250442
3
+ metadata.gz: c7f75280e6de836ade9651a83a0804b4f441c937
4
+ data.tar.gz: 347b1bab09bea16fe8c4cfaaa2bcc7cadc621ff8
5
5
  SHA512:
6
- metadata.gz: 9cf496501bea635a853e37640c05b3b9db4b78e8f970679969ed6d9f8bcf96aef67b58950da943294d6b6b3e59eed84917f17c9cbd62a61be8b6400eebd9b5c0
7
- data.tar.gz: 9dd9838eca1a04540206a064d98204a5dcd78378adeed058f9b2cc94722964209d7f10eee387bbf3f78055dc980360816b34d450a235a4aad2ca9cf6249694a0
6
+ metadata.gz: 6e424be1a4992dc9dddb70b8a573e081975f74fb1db46547531075f3d928f7411905d433e519fc934f03faf7d3f92262bd8302b95e11cbde8aaad663e730456f
7
+ data.tar.gz: 1404fe0a4ab78c9f822e13bcd005f65dc85919d47ef47744c7a6fa54cc81f9a7b9f612987e4e062cfa2462a2a2943e72f367436ca55f1ec3c105627deeadaa5d
@@ -2,9 +2,5 @@ require 'rspec/core/formatters/base_formatter'
2
2
  module KanoahRSpecFormatter
3
3
  class BaseFormatter < RSpec::Core::Formatters::BaseFormatter
4
4
  NOTIFICATIONS = %i[start example_started example_passed example_failed example_pending].freeze
5
-
6
- def start(notification)
7
- @api = Kanoah::Client.new
8
- end
9
5
  end
10
6
  end
@@ -6,10 +6,6 @@ class KanoahResultFormatter < KanoahRSpecFormatter::BaseFormatter
6
6
  @output = output
7
7
  end
8
8
 
9
- def start(notification)
10
- super(notification)
11
- end
12
-
13
9
  def example_passed(notification)
14
10
  proccess_result(notification.example) if notification.example.metadata.key?(:test_id) && !test_id(notification.example).empty?
15
11
  end
@@ -29,8 +25,9 @@ class KanoahResultFormatter < KanoahRSpecFormatter::BaseFormatter
29
25
  private
30
26
 
31
27
  def proccess_result(example)
28
+ api = Kanoah::Client.new
32
29
  body = example.metadata[:steps].nil? ? without_steps(example) : with_steps(example)
33
- @api.test_run_id ? @api.post_new_result_to_run(body) : @api.post_new_result(body)
30
+ api.test_run_id ? api.post_new_result_to_run(body) : api.post_new_result(body)
34
31
  end
35
32
 
36
33
  def test_id(example)
@@ -1,3 +1,3 @@
1
1
  module KanoahRSpecFormatter
2
- VERSION = '0.2.11'
2
+ VERSION = '0.2.12'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kanoah_rspec_formatter
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.11
4
+ version: 0.2.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - Automation Wizards
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-04-19 00:00:00.000000000 Z
11
+ date: 2017-05-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler