allure_turnip 0.2.0 → 0.2.1

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
  SHA256:
3
- metadata.gz: ef7d70576f3dc4e0b4f6f42ffd33b16357755d782775c28252869622b20ffcd9
4
- data.tar.gz: 45d9429e548a4da68085190c4f492ba6ca02c1ffb7205c309485de930d060cd2
3
+ metadata.gz: 62ad1e5048e18e54eda488dc29bc1e411f2896cb1c9b2ebe7b03a0e56c0b88a9
4
+ data.tar.gz: 449e4fb87d84b38cd5ca6be05f5e38fe518f895434b3ceaf0f88385acd97af41
5
5
  SHA512:
6
- metadata.gz: 7cce7ffb7ac770d8660089a996d5c414be9d620b2fb35dddfd660582f85afcf98930686a7c40d4396e1516dbb327515b5d8d4388c89b611132f06d40fba50e92
7
- data.tar.gz: ead43ca78aaea53cc8ea228881469d9272acfcbe6615f573198a303e265150b5c8354aef63ee462045fd59da90a663b23271b3721a8330e4caf54ab8b568a314
6
+ metadata.gz: e182a3501609fd91081baa475f006524b03bb58d8d86e9dc661932574aec37527f5b2d0839d7e396259e83fce151680ccbe43e3ec0a42f68759345248ff21a88
7
+ data.tar.gz: 8b6e43680e155cf5f500284d6fe9c31cc058bfda21ea361b25fabaccccd1683a9153a5c4354b96273d1592fd87dc90dce3fa568dcf994cfba286ee5546acf6c3
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- allure_turnip (0.2.0)
4
+ allure_turnip (0.2.1)
5
5
  allure-ruby-adaptor-api (= 0.7.0)
6
6
  rspec (~> 3.5)
7
7
  turnip (~> 3.0)
@@ -15,12 +15,18 @@ module AllureTurnip
15
15
 
16
16
  def allure_step(step, &block)
17
17
  begin
18
- AllureRubyAdaptorApi::Builder.start_step(__suite, __test, step)
19
- __with_step step, &block
20
- AllureRubyAdaptorApi::Builder.stop_step(__suite, __test, step)
21
- rescue Exception => e
22
- AllureRubyAdaptorApi::Builder.stop_step(__suite, __test, step, :failed)
23
- raise e
18
+ locked = __mutex.try_lock
19
+ if locked
20
+ @@__current_step = step
21
+ __with_allure_step(step, &block)
22
+ else
23
+ __with_step(step,&block)
24
+ end
25
+ ensure
26
+ if locked
27
+ @@__current_step = nil
28
+ __mutex.unlock
29
+ end
24
30
  end
25
31
  end
26
32
 
@@ -51,22 +57,22 @@ module AllureTurnip
51
57
  @@__mutex ||= Mutex.new
52
58
  end
53
59
 
54
- def __with_step(step, &block)
60
+ def __with_allure_step(step, &block)
55
61
  begin
56
- locked = __mutex.try_lock
57
- if locked
58
- @@__current_step = step
59
- AllureTurnip.context.rspec.hooks.send :run, :before, :step, self
60
- yield self
61
- end
62
- ensure
63
- if locked
64
- AllureTurnip.context.rspec.hooks.send :run, :after, :step, self
65
- @@__current_step = nil
66
- __mutex.unlock
67
- end
62
+ AllureRubyAdaptorApi::Builder.start_step(__suite, __test, step)
63
+ __with_step(step, &block)
64
+ AllureRubyAdaptorApi::Builder.stop_step(__suite, __test, step)
65
+ rescue Exception => e
66
+ AllureRubyAdaptorApi::Builder.stop_step(__suite, __test, step, :failed)
67
+ raise e
68
68
  end
69
69
  end
70
+
71
+ def __with_step(step, &block)
72
+ AllureTurnip.context.rspec.hooks.send :run, :before, :step, self
73
+ yield self
74
+ AllureTurnip.context.rspec.hooks.send :run, :after, :step, self
75
+ end
70
76
  end
71
77
  end
72
78
  end
@@ -1,5 +1,5 @@
1
1
  module AllureTurnip # :nodoc:
2
2
  module Version # :nodoc:
3
- STRING = '0.2.0'
3
+ STRING = '0.2.1'
4
4
  end
5
5
  end
@@ -5,6 +5,9 @@ Feature: Step-calling steps
5
5
  Scenario: when the called step is visible
6
6
  Given a visible step call
7
7
 
8
+ Scenario: when the called failed step is visible, this test should fail
9
+ Given a visible failed step call
10
+
8
11
  Scenario: when the called step is not visible
9
12
  Given an invisible step call
10
13
 
@@ -8,6 +8,15 @@ steps_for :step_calling do
8
8
  @testing.should eq(123)
9
9
  end
10
10
 
11
+ step 'visible failed callee' do
12
+ @testing = 123
13
+ @testing.should eq(321)
14
+ end
15
+
16
+ step 'a visible failed step call' do
17
+ step 'visible failed callee'
18
+ end
19
+
11
20
  step 'an invisible step call' do
12
21
  step 'this is an unimplemented step'
13
22
  end
@@ -1,14 +1,14 @@
1
1
  Feature: Red Dragons are deadly
2
2
 
3
3
  @dragon
4
- Scenario:
4
+ Scenario: Not red dragon
5
5
  Given there is a dragon
6
6
  And there is a knight
7
7
  When the dragon attacks the knight
8
8
  Then the knight is alive
9
9
 
10
10
  @red_dragon
11
- Scenario:
11
+ Scenario: red dragon
12
12
  Given there is a dragon
13
13
  And the dragon breathes fire
14
14
  And there is a knight
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: allure_turnip
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - aha-oretama
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-02-10 00:00:00.000000000 Z
11
+ date: 2019-02-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec
@@ -158,5 +158,5 @@ requirements: []
158
158
  rubygems_version: 3.0.2
159
159
  signing_key:
160
160
  specification_version: 4
161
- summary: allure_turnip-0.2.0
161
+ summary: allure_turnip-0.2.1
162
162
  test_files: []