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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f9c864837089f720e5ce33c85dae230c4acf15ce
|
4
|
+
data.tar.gz: 54856bf95129f6ec4f76c939b7661cb1638cb7b2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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::
|
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
|
data/lib/knapsack_pro/version.rb
CHANGED
@@ -4,12 +4,35 @@ describe KnapsackPro::Adapters::CucumberAdapter do
|
|
4
4
|
end
|
5
5
|
|
6
6
|
context do
|
7
|
-
|
8
|
-
|
9
|
-
|
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
|
-
|
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.
|
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-
|
11
|
+
date: 2017-10-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|