knapsack_pro 0.51.0 → 0.52.0

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: 10e2d8e67cd45d4f4624e1c9630b27e5d83b6967
4
- data.tar.gz: 160d472acb1cab42aa1870d62ee84dd1c897e216
3
+ metadata.gz: f9c864837089f720e5ce33c85dae230c4acf15ce
4
+ data.tar.gz: 54856bf95129f6ec4f76c939b7661cb1638cb7b2
5
5
  SHA512:
6
- metadata.gz: 6aa5e6a9480e6c8e96669ddfa20bce9b62251ecb8aafb95d5ef25aec88a34ca138e922f5b8e8452e8a9577cd645be19c5a016efafe26a94319a7c6763dc57557
7
- data.tar.gz: 96d936aacfb332ebe49b0e669fcd2b55ded28c9e563a82f50da74a68892820be58091d53595e6b77e0d1a0ce314268613f7cf3ff7b6ac121db332ebd3cc295ca
6
+ metadata.gz: 8d504081bf233b8c46559d2a1dda98ab9bf3c43c25024c1881cefb55c333bbd6183ac47fcb1eb6501bd2b2a4ba43faf0e5d93bb10417077c4ad68d57c07255cb
7
+ data.tar.gz: 5ec84936d95a7ea1835bdbdfc18c8a1b918d2e4478e35d37c7c06d1092eb2ac371965257e72f420635102d330132f457312a7f6759b62b066fc0a0ee9b5677e1
data/CHANGELOG.md CHANGED
@@ -2,6 +2,14 @@
2
2
 
3
3
  * TODO
4
4
 
5
+ ### 0.52.0
6
+
7
+ * Add support for Cucumber 3.
8
+
9
+ https://github.com/KnapsackPro/knapsack_pro-ruby/pull/54
10
+
11
+ https://github.com/KnapsackPro/knapsack_pro-ruby/compare/v0.51.0...v0.52.0
12
+
5
13
  ### 0.51.0
6
14
 
7
15
  * Add support for test-unit test runner.
@@ -56,7 +56,11 @@ module KnapsackPro
56
56
  private
57
57
 
58
58
  def Around(*tag_expressions, &proc)
59
- ::Cucumber::RbSupport::RbDsl.register_rb_hook('around', tag_expressions, proc)
59
+ if ::Cucumber::VERSION.to_i >= 3
60
+ ::Cucumber::Glue::Dsl.register_rb_hook('around', tag_expressions, proc)
61
+ else
62
+ ::Cucumber::RbSupport::RbDsl.register_rb_hook('around', tag_expressions, proc)
63
+ end
60
64
  end
61
65
  end
62
66
  end
@@ -1,3 +1,3 @@
1
1
  module KnapsackPro
2
- VERSION = '0.51.0'
2
+ VERSION = '0.52.0'
3
3
  end
@@ -4,12 +4,35 @@ describe KnapsackPro::Adapters::CucumberAdapter do
4
4
  end
5
5
 
6
6
  context do
7
- before do
8
- allow(::Cucumber::RbSupport::RbDsl).to receive(:register_rb_hook)
9
- allow(Kernel).to receive(:at_exit)
7
+ context 'when Cucumber version 1' do
8
+ before do
9
+ stub_const('Cucumber::VERSION', '1.3.20')
10
+ allow(::Cucumber::RbSupport::RbDsl).to receive(:register_rb_hook)
11
+ allow(Kernel).to receive(:at_exit)
12
+ end
13
+
14
+ it_behaves_like 'adapter'
10
15
  end
11
16
 
12
- it_behaves_like 'adapter'
17
+ context 'when Cucumber version 2' do
18
+ before do
19
+ stub_const('Cucumber::VERSION', '2')
20
+ allow(::Cucumber::RbSupport::RbDsl).to receive(:register_rb_hook)
21
+ allow(Kernel).to receive(:at_exit)
22
+ end
23
+
24
+ it_behaves_like 'adapter'
25
+ end
26
+
27
+ context 'when Cucumber version 3' do
28
+ before do
29
+ stub_const('Cucumber::VERSION', '3.0.0')
30
+ allow(::Cucumber::Glue::Dsl).to receive(:register_rb_hook)
31
+ allow(Kernel).to receive(:at_exit)
32
+ end
33
+
34
+ it_behaves_like 'adapter'
35
+ end
13
36
  end
14
37
 
15
38
  describe '.test_path' do
@@ -1,5 +1,6 @@
1
- # https://github.com/cucumber/cucumber/blob/master/lib/cucumber/rb_support/rb_dsl.rb
2
1
  module Cucumber
2
+ # Cucumber 1 and 2
3
+ # https://github.com/cucumber/cucumber-ruby/blob/v2.99.0/lib/cucumber/rb_support/rb_dsl.rb
3
4
  module RbSupport
4
5
  class RbDsl
5
6
  class << self
@@ -9,4 +10,16 @@ module Cucumber
9
10
  end
10
11
  end
11
12
  end
13
+
14
+ # Cucumber 3
15
+ # https://github.com/cucumber/cucumber-ruby/blob/v3.0.0/lib/cucumber/glue/dsl.rb
16
+ module Glue
17
+ class Dsl
18
+ class << self
19
+ def register_rb_hook(phase, tag_names, proc)
20
+ proc.call
21
+ end
22
+ end
23
+ end
24
+ end
12
25
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: knapsack_pro
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.51.0
4
+ version: 0.52.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - ArturT
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-10-02 00:00:00.000000000 Z
11
+ date: 2017-10-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake