kanoah_rspec_formatter 0.2.2 → 0.2.3

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: 7d8e0e3009b18e910df64d2b49ab75655cc0a4ad
4
- data.tar.gz: 6385ab18f3ce23fea396cedd71d814f4bfb1d938
3
+ metadata.gz: f9301421d9f1cda03dd754dade49004c8224f69f
4
+ data.tar.gz: d27aa4fae72f69d10ac6e6fa3dba2e2f39b4d322
5
5
  SHA512:
6
- metadata.gz: f1ae399977de72795d01bb3e9ddc542aed9b0bd603c5db11da993f120897c41abd99e4c78fa7a913667905808de962f5aca3bcfe4a1af34e9a82185ace77c14a
7
- data.tar.gz: 9e7a8206dd1784b899cba06677a8a89840584be2f9adf4f24c8824bda1122f52e6fbffebc63429ab8acaea1b7d5393f4a4a63e300033f7df53497ca3be85b414
6
+ metadata.gz: 64bd12f441b27dcd36f602e78f863cf4a4338114afdf8538c4923eba277e3f72b857488de22f70a009886fd8f87fa07675a58dc9d2df9415c6615129036718ce
7
+ data.tar.gz: 10128881c99197172981ea9829227311b5d5653d6aad6ab6d451874faa1a3867ee19aa4661e492e677e09773354d7dab304c24960ac74c175438817bb75b407a
@@ -1,16 +1,23 @@
1
1
  module KanoahRSpecFormatter
2
2
  module Example
3
- def step(_step, options = {}, &block)
3
+ def step(step, options = {}, &block)
4
4
  @metadata[:steps] = [] if @metadata[:steps].nil?
5
5
  begin
6
6
  yield block
7
- @metadata[:steps].push({ step_name: _step,index: @metadata[:step_index], status: 'Pass' })
7
+ @metadata[:steps].push({ step_name: step,index: @metadata[:step_index], status: 'Pass' })
8
8
  rescue Exception => e
9
- @metadata[:steps].push({ step_name: _step, index: @metadata[:step_index], status: 'Fail', comment: e })
9
+ binding.pry
10
+ @metadata[:steps].push({ step_name: step, index: @metadata[:step_index], status: 'Fail', comment: process_exception(e) })
10
11
  fail
11
12
  ensure
12
13
  @metadata[:step_index] += 1 if @metadata.has_key?(:step_index)
13
14
  end
14
15
  end
16
+
17
+ private
18
+
19
+ def process_exception(exception)
20
+ exception.is_a?(RSpec::Expectations::MultipleExpectationsNotMetError) ? exception.failures : exception
21
+ end
15
22
  end
16
23
  end
@@ -1,3 +1,3 @@
1
1
  module KanoahRSpecFormatter
2
- VERSION = '0.2.2'
2
+ VERSION = '0.2.3'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kanoah_rspec_formatter
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Automation Wizards