cucumber-core 1.1.2 → 1.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/HISTORY.md +9 -1
- data/lib/cucumber/core/ast/comment.rb +4 -0
- data/lib/cucumber/core/ast/data_table.rb +1 -1
- data/lib/cucumber/core/ast/doc_string.rb +9 -0
- data/lib/cucumber/core/ast/empty_background.rb +4 -0
- data/lib/cucumber/core/ast/empty_multiline_argument.rb +4 -0
- data/lib/cucumber/core/ast/examples_table.rb +5 -1
- data/lib/cucumber/core/ast/names.rb +5 -0
- data/lib/cucumber/core/ast/outline_step.rb +5 -0
- data/lib/cucumber/core/ast/step.rb +5 -0
- data/lib/cucumber/core/ast/tag.rb +4 -0
- data/lib/cucumber/core/test/action.rb +1 -1
- data/lib/cucumber/core/test/case.rb +1 -1
- data/lib/cucumber/core/test/step.rb +1 -1
- data/lib/cucumber/core/version.rb +1 -1
- data/spec/cucumber/core/ast/background_spec.rb +10 -0
- data/spec/cucumber/core/ast/doc_string_spec.rb +16 -0
- metadata +5 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d0a8905410eaa2520b979eefe561fdd066e0c703
|
4
|
+
data.tar.gz: 882b6415e6c942bce875cbef62c3afadd5964dcc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b3f6a53c774b90832b8f6e86245a7107e4ebab450b8c7aa5d714309a7e3c367c60cbff5e06bbbfb67a6b2b8e853e2b32efbfef64f81dfe48b99d18ead9864132
|
7
|
+
data.tar.gz: 6e3c7953c11347def64e8fd184f3a2f11514ae24d1204c2ae9d52bb48518ab7a1fb1e6d15c3305e549c9c683af390b155d6c3888546dba970212499800ef5142
|
data/HISTORY.md
CHANGED
@@ -1,4 +1,12 @@
|
|
1
|
-
## [In Git](https://github.com/cucumber/cucumber-ruby-core/compare/v1.1.
|
1
|
+
## [In Git](https://github.com/cucumber/cucumber-ruby-core/compare/v1.1.3...master)
|
2
|
+
|
3
|
+
## [v1.1.3](https://github.com/cucumber/cucumber-ruby-core/compare/v1.1.2...v1.1.2)
|
4
|
+
|
5
|
+
### New Features
|
6
|
+
|
7
|
+
* Added custom `inspect` methods for AST Nodes (@tooky)
|
8
|
+
|
9
|
+
## [v1.1.2](https://github.com/cucumber/cucumber-ruby-core/compare/v1.1.1...v1.1.2)
|
2
10
|
|
3
11
|
### New Features
|
4
12
|
|
@@ -52,6 +52,10 @@ module Cucumber
|
|
52
52
|
def build_row(row_cells, number, location, language)
|
53
53
|
Row.new(Hash[@cells.zip(row_cells)], number, location, language)
|
54
54
|
end
|
55
|
+
|
56
|
+
def inspect
|
57
|
+
"#<#{self.class} #{values} (#{location})>"
|
58
|
+
end
|
55
59
|
end
|
56
60
|
|
57
61
|
class Row
|
@@ -88,7 +92,7 @@ module Cucumber
|
|
88
92
|
end
|
89
93
|
|
90
94
|
def inspect
|
91
|
-
"
|
95
|
+
"#<#{self.class}: #{@data.inspect} (#{location})>"
|
92
96
|
end
|
93
97
|
|
94
98
|
protected
|
@@ -21,6 +21,11 @@ module Cucumber
|
|
21
21
|
Ast::ExpandedOutlineStep.new(self, gherkin_statement, language, row.location, keyword, row.expand(name), replace_multiline_arg(row))
|
22
22
|
end
|
23
23
|
|
24
|
+
def inspect
|
25
|
+
keyword_and_name = [keyword, name].join(": ")
|
26
|
+
%{#<#{self.class} "#{keyword_and_name}" (#{location})>}
|
27
|
+
end
|
28
|
+
|
24
29
|
private
|
25
30
|
|
26
31
|
def description_for_visitors
|
@@ -0,0 +1,10 @@
|
|
1
|
+
require 'cucumber/core/ast/background'
|
2
|
+
module Cucumber::Core::Ast
|
3
|
+
describe Background do
|
4
|
+
it "has a useful inspect" do
|
5
|
+
location = Location.new("features/a_feature.feature", 3)
|
6
|
+
background = Background.new(double, double, location, double, "Background", "the name", double, [])
|
7
|
+
expect(background.inspect).to eq(%{#<Cucumber::Core::Ast::Background "Background: the name" (#{location})>})
|
8
|
+
end
|
9
|
+
end
|
10
|
+
end
|
@@ -1,5 +1,6 @@
|
|
1
1
|
require 'cucumber/core/ast/location'
|
2
2
|
require 'cucumber/core/ast/doc_string'
|
3
|
+
require 'unindent'
|
3
4
|
|
4
5
|
module Cucumber
|
5
6
|
module Core
|
@@ -92,6 +93,21 @@ module Cucumber
|
|
92
93
|
end
|
93
94
|
end
|
94
95
|
end
|
96
|
+
|
97
|
+
context "inspect" do
|
98
|
+
let(:location) { Location.new("features/feature.feature", 8) }
|
99
|
+
let(:content_type) { 'text/plain' }
|
100
|
+
|
101
|
+
it "provides a useful inspect method" do
|
102
|
+
doc_string = DocString.new("some text", content_type, location)
|
103
|
+
expect(doc_string.inspect).to eq <<-END.chomp.unindent
|
104
|
+
#<Cucumber::Core::Ast::DocString (features/feature.feature:8)
|
105
|
+
"""text/plain
|
106
|
+
some text
|
107
|
+
""">
|
108
|
+
END
|
109
|
+
end
|
110
|
+
end
|
95
111
|
end
|
96
112
|
end
|
97
113
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cucumber-core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Aslak Hellesøy
|
@@ -12,7 +12,7 @@ authors:
|
|
12
12
|
autorequire:
|
13
13
|
bindir: bin
|
14
14
|
cert_chain: []
|
15
|
-
date: 2015-03-
|
15
|
+
date: 2015-03-25 00:00:00.000000000 Z
|
16
16
|
dependencies:
|
17
17
|
- !ruby/object:Gem::Dependency
|
18
18
|
name: gherkin
|
@@ -171,6 +171,7 @@ files:
|
|
171
171
|
- lib/cucumber/core/version.rb
|
172
172
|
- spec/capture_warnings.rb
|
173
173
|
- spec/coverage.rb
|
174
|
+
- spec/cucumber/core/ast/background_spec.rb
|
174
175
|
- spec/cucumber/core/ast/data_table_spec.rb
|
175
176
|
- spec/cucumber/core/ast/doc_string_spec.rb
|
176
177
|
- spec/cucumber/core/ast/empty_multiline_argument_spec.rb
|
@@ -217,10 +218,11 @@ rubyforge_project:
|
|
217
218
|
rubygems_version: 2.2.2
|
218
219
|
signing_key:
|
219
220
|
specification_version: 4
|
220
|
-
summary: cucumber-core-1.1.
|
221
|
+
summary: cucumber-core-1.1.3
|
221
222
|
test_files:
|
222
223
|
- spec/capture_warnings.rb
|
223
224
|
- spec/coverage.rb
|
225
|
+
- spec/cucumber/core/ast/background_spec.rb
|
224
226
|
- spec/cucumber/core/ast/data_table_spec.rb
|
225
227
|
- spec/cucumber/core/ast/doc_string_spec.rb
|
226
228
|
- spec/cucumber/core/ast/empty_multiline_argument_spec.rb
|