knapsack_pro 0.6.1 → 0.7.0

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: e41ce129d258360e64050f7380ee3b7c3cfc89d8
4
- data.tar.gz: 270f823ed264b1d9a0cd79d77bf4672b604fb978
3
+ metadata.gz: 2c09245212dbcd947f2d0ef42545a102cb066726
4
+ data.tar.gz: 41b113222a7516b0a896d234e7139a342216ac83
5
5
  SHA512:
6
- metadata.gz: 48689d8b6b2a108e10836d9f9556bdd9606afa34b8be6539b5fab405f8b4ae5e5efbedb59591cc1125c88b530bc91ee0bc18ba4651f44cca2939de79c6f140ee
7
- data.tar.gz: b025a6d739f1165199087fc2333125c60cfa949289fce7aa460dc6487b157e5e4fe9370e3de8265ef4150e950a91e6c28baa91fc148934e8d711c742c9c5b750
6
+ metadata.gz: 3a94e5bf2d47d45948c575a5c65ce7c998a68664682e35a396444770246719f1979f755806aa6e8f41797fe5c9a351dce3a61051f01df30d3cde4dee48faf603
7
+ data.tar.gz: b0796d9c973b86cdfea8a7976fab67e0013b8132d3ab57932b2b5f84327ce3f323c56ccb28883b1e9038f4cd4c78b793da72265461cd8f11c20379474b00441d
data/CHANGELOG.md CHANGED
@@ -2,6 +2,12 @@
2
2
 
3
3
  * TODO
4
4
 
5
+ ### 0.7.0
6
+
7
+ * Add support for older cucumber versions than 1.3
8
+
9
+ https://github.com/KnapsackPro/knapsack_pro-ruby/compare/v0.6.1...v0.7.0
10
+
5
11
  ### 0.6.1
6
12
 
7
13
  * Changed rake task in minitest_runner.rb to have no warnings output
data/knapsack_pro.gemspec CHANGED
@@ -24,7 +24,7 @@ Gem::Specification.new do |spec|
24
24
  spec.add_development_dependency 'bundler', '~> 1.6'
25
25
  spec.add_development_dependency 'rspec', '~> 3.0', '>= 2.0.0'
26
26
  spec.add_development_dependency 'rspec-its', '~> 1.2'
27
- spec.add_development_dependency 'cucumber', '>= 1.3'
27
+ spec.add_development_dependency 'cucumber', '>= 0'
28
28
  spec.add_development_dependency 'minitest', '>= 5.0.0'
29
29
  spec.add_development_dependency 'codeclimate-test-reporter', '~> 0'
30
30
  spec.add_development_dependency 'pry', '~> 0'
@@ -8,11 +8,22 @@ module KnapsackPro
8
8
  test_case = object
9
9
  test_case.location.file
10
10
  else
11
- scenario_or_outline_table = object
12
- if scenario_or_outline_table.respond_to?(:file)
13
- scenario_or_outline_table.file
11
+ if object.respond_to?(:scenario_outline)
12
+ if object.scenario_outline.respond_to?(:feature)
13
+ # Cucumber < 1.3
14
+ object.scenario_outline.feature.file
15
+ else
16
+ # Cucumber >= 1.3
17
+ object.scenario_outline.file
18
+ end
14
19
  else
15
- scenario_or_outline_table.scenario_outline.file
20
+ if object.respond_to?(:feature)
21
+ # Cucumber < 1.3
22
+ object.feature.file
23
+ else
24
+ # Cucumber >= 1.3
25
+ object.file
26
+ end
16
27
  end
17
28
  end
18
29
  end
@@ -1,3 +1,3 @@
1
1
  module KnapsackPro
2
- VERSION = '0.6.1'
2
+ VERSION = '0.7.0'
3
3
  end
@@ -18,20 +18,40 @@ describe KnapsackPro::Adapters::CucumberAdapter do
18
18
 
19
19
  before { stub_const('Cucumber::VERSION', '1') }
20
20
 
21
- context 'when scenario' do
22
- let(:scenario_file) { 'features/scenario.feature' }
23
- let(:scenario_or_outline_table) { double(file: scenario_file) }
21
+ context 'when cucumber >= 1.3' do
22
+ context 'when scenario' do
23
+ let(:scenario_file) { 'features/scenario.feature' }
24
+ let(:scenario_or_outline_table) { double(file: scenario_file) }
24
25
 
25
- it { should eql scenario_file }
26
+ it { should eql scenario_file }
27
+ end
28
+
29
+ context 'when scenario outline' do
30
+ let(:scenario_outline_file) { 'features/scenario_outline.feature' }
31
+ let(:scenario_or_outline_table) do
32
+ double(scenario_outline: double(file: scenario_outline_file))
33
+ end
34
+
35
+ it { should eql scenario_outline_file }
36
+ end
26
37
  end
27
38
 
28
- context 'when scenario outline' do
29
- let(:scenario_outline_file) { 'features/scenario_outline.feature' }
30
- let(:scenario_or_outline_table) do
31
- double(scenario_outline: double(file: scenario_outline_file))
39
+ context 'when cucumber < 1.3' do
40
+ context 'when scenario' do
41
+ let(:scenario_file) { 'features/scenario.feature' }
42
+ let(:scenario_or_outline_table) { double(feature: double(file: scenario_file)) }
43
+
44
+ it { should eql scenario_file }
32
45
  end
33
46
 
34
- it { should eql scenario_outline_file }
47
+ context 'when scenario outline' do
48
+ let(:scenario_outline_file) { 'features/scenario_outline.feature' }
49
+ let(:scenario_or_outline_table) do
50
+ double(scenario_outline: double(feature: double(file: scenario_outline_file)))
51
+ end
52
+
53
+ it { should eql scenario_outline_file }
54
+ end
35
55
  end
36
56
  end
37
57
 
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.6.1
4
+ version: 0.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - ArturT
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-03-18 00:00:00.000000000 Z
11
+ date: 2016-04-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -92,14 +92,14 @@ dependencies:
92
92
  requirements:
93
93
  - - ">="
94
94
  - !ruby/object:Gem::Version
95
- version: '1.3'
95
+ version: '0'
96
96
  type: :development
97
97
  prerelease: false
98
98
  version_requirements: !ruby/object:Gem::Requirement
99
99
  requirements:
100
100
  - - ">="
101
101
  - !ruby/object:Gem::Version
102
- version: '1.3'
102
+ version: '0'
103
103
  - !ruby/object:Gem::Dependency
104
104
  name: minitest
105
105
  requirement: !ruby/object:Gem::Requirement