brine-dsl 0.6.0 → 0.7.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: f3a218b02acd1fc90e2ca605c74ce54a37b9b05a
4
- data.tar.gz: 7919bf69e899db000df3bdb3c682875e02d1df32
3
+ metadata.gz: 7f19aef4fbac95c72005238b111b25269e162a6f
4
+ data.tar.gz: deef83dd9d4164c46912f2ee5af753e12ab4eeba
5
5
  SHA512:
6
- metadata.gz: 52d2907d296a7794f619adbd6dfafabe45aa6d572c50d0520edea5310c47fbc91eed1c937b73551960ef1f89da8d35a7239bfa7f618e44bf9c095eec6c197430
7
- data.tar.gz: 31b7748a12f98aa942d21e6e58ac7c26ed014bbf3c66bc9bb19308568fc52b70b8d62209fa8ab5fdfe6ed3d7b0743da889ad1910264a2761526c92ba0f2e7e14
6
+ metadata.gz: ef580d0dcba4fc0612f0f01c69bcb88bf077d8f48416a6759a93e964eec369bcab0a531c1bfa007dd4cff8652662f27afeb076872ed15a30c42bbf41acaec43d
7
+ data.tar.gz: ddd8cbea1ea7b645dab1f5513a5fcc0213ef116b800f1880b1db146c7805ed01ff8398239fa20e1e97bcff13734c1a258153c5c182d103a8bc84070d012d50b9
data/CHANGELOG.md ADDED
@@ -0,0 +1,170 @@
1
+ # Change Log
2
+
3
+ ## [v0.6.0](https://github.com/brightcove/brine/tree/v0.6.0) (2018-02-08)
4
+ [Full Changelog](https://github.com/brightcove/brine/compare/v0.5.0...v0.6.0)
5
+
6
+ **Closed issues:**
7
+
8
+ - Assertion for empty values [\#99](https://github.com/brightcove/brine/issues/99)
9
+
10
+ **Merged pull requests:**
11
+
12
+ - Expose Faraday middleware extensibility [\#102](https://github.com/brightcove/brine/pull/102) ([mwhipple](https://github.com/mwhipple))
13
+ - Add is\_empty assertion \(Fix \#99\) [\#100](https://github.com/brightcove/brine/pull/100) ([mwhipple](https://github.com/mwhipple))
14
+
15
+ ## [v0.5.0](https://github.com/brightcove/brine/tree/v0.5.0) (2017-12-05)
16
+ [Full Changelog](https://github.com/brightcove/brine/compare/0.5.0...v0.5.0)
17
+
18
+ **Closed issues:**
19
+
20
+ - Publish first Gem [\#83](https://github.com/brightcove/brine/issues/83)
21
+
22
+ **Merged pull requests:**
23
+
24
+ - Add travis config; rename gem \(Fix \#83\) [\#94](https://github.com/brightcove/brine/pull/94) ([mwhipple](https://github.com/mwhipple))
25
+
26
+ ## [0.5.0](https://github.com/brightcove/brine/tree/0.5.0) (2017-12-05)
27
+ [Full Changelog](https://github.com/brightcove/brine/compare/0.4.0...0.5.0)
28
+
29
+ **Fixed bugs:**
30
+
31
+ - Pin cucumber version [\#85](https://github.com/brightcove/brine/issues/85)
32
+
33
+ **Closed issues:**
34
+
35
+ - Assess custom testing "store" vs. Faraday doubles [\#89](https://github.com/brightcove/brine/issues/89)
36
+ - Integer type matching [\#82](https://github.com/brightcove/brine/issues/82)
37
+ - Publish/Open Source [\#78](https://github.com/brightcove/brine/issues/78)
38
+ - GitHub access for Brightcove [\#76](https://github.com/brightcove/brine/issues/76)
39
+ - RFC: Object Traversal Syntax [\#62](https://github.com/brightcove/brine/issues/62)
40
+ - make cleanup delete retries more intentional [\#31](https://github.com/brightcove/brine/issues/31)
41
+
42
+ **Merged pull requests:**
43
+
44
+ - Pin cucumber version \(Fix \#85\) [\#93](https://github.com/brightcove/brine/pull/93) ([mwhipple](https://github.com/mwhipple))
45
+ - Slightly less optimistic cleanup calls \(Fix \#31\) [\#92](https://github.com/brightcove/brine/pull/92) ([mwhipple](https://github.com/mwhipple))
46
+ - tests: Replace `store` with Faraday doubles [\#90](https://github.com/brightcove/brine/pull/90) ([mwhipple](https://github.com/mwhipple))
47
+ - Add type checking for Integers \(Fix \#82\) [\#88](https://github.com/brightcove/brine/pull/88) ([mwhipple](https://github.com/mwhipple))
48
+ - Support specifying request header values [\#80](https://github.com/brightcove/brine/pull/80) ([mwhipple](https://github.com/mwhipple))
49
+ - Add LICENSE [\#79](https://github.com/brightcove/brine/pull/79) ([mwhipple](https://github.com/mwhipple))
50
+ - Update docs; Cleanup [\#74](https://github.com/brightcove/brine/pull/74) ([mwhipple](https://github.com/mwhipple))
51
+
52
+ ## [0.4.0](https://github.com/brightcove/brine/tree/0.4.0) (2017-09-20)
53
+ [Full Changelog](https://github.com/brightcove/brine/compare/0.3.3...0.4.0)
54
+
55
+ **Closed issues:**
56
+
57
+ - RFC: New Documentation solution [\#70](https://github.com/brightcove/brine/issues/70)
58
+ - Replace docs [\#68](https://github.com/brightcove/brine/issues/68)
59
+ - Enforce ruby version [\#38](https://github.com/brightcove/brine/issues/38)
60
+ - Type tests [\#63](https://github.com/brightcove/brine/issues/63)
61
+
62
+ **Merged pull requests:**
63
+
64
+ - Support request query parameters [\#72](https://github.com/brightcove/brine/pull/72) ([mwhipple](https://github.com/mwhipple))
65
+ - Initial User Guide \(Fixes \#70, \#68\) [\#71](https://github.com/brightcove/brine/pull/71) ([mwhipple](https://github.com/mwhipple))
66
+
67
+ ## [0.3.3](https://github.com/brightcove/brine/tree/0.3.3) (2017-09-19)
68
+ [Full Changelog](https://github.com/brightcove/brine/compare/0.3.2...0.3.3)
69
+
70
+ **Closed issues:**
71
+
72
+ - RFC: Switch back to jsonpath [\#59](https://github.com/brightcove/brine/issues/59)
73
+
74
+ **Merged pull requests:**
75
+
76
+ - JSONPath for Traversal \(POC for \#62\) [\#65](https://github.com/brightcove/brine/pull/65) ([mwhipple](https://github.com/mwhipple))
77
+ - Add assertions for JSON types \(Fix \#63\) [\#64](https://github.com/brightcove/brine/pull/64) ([mwhipple](https://github.com/mwhipple))
78
+
79
+ ## [0.3.2](https://github.com/brightcove/brine/tree/0.3.2) (2017-08-10)
80
+ [Full Changelog](https://github.com/brightcove/brine/compare/0.3.1...0.3.2)
81
+
82
+ **Merged pull requests:**
83
+
84
+ - adding options and head request methods [\#61](https://github.com/brightcove/brine/pull/61) ([tnc5484](https://github.com/tnc5484))
85
+
86
+ ## [0.3.1](https://github.com/brightcove/brine/tree/0.3.1) (2017-08-03)
87
+ [Full Changelog](https://github.com/brightcove/brine/compare/0.3.0...0.3.1)
88
+
89
+ **Closed issues:**
90
+
91
+ - improve HTTP logging [\#49](https://github.com/brightcove/brine/issues/49)
92
+
93
+ **Merged pull requests:**
94
+
95
+ - Log HTTP bodies with DEBUG \(Fix \#49\) [\#55](https://github.com/brightcove/brine/pull/55) ([mwhipple](https://github.com/mwhipple))
96
+
97
+ ## [0.3.0](https://github.com/brightcove/brine/tree/0.3.0) (2017-07-28)
98
+ [Full Changelog](https://github.com/brightcove/brine/compare/0.2.0...0.3.0)
99
+
100
+ **Implemented enhancements:**
101
+
102
+ - Define step for binding a timestamp [\#14](https://github.com/brightcove/brine/issues/14)
103
+
104
+ **Fixed bugs:**
105
+
106
+ - Deprecation code is not requoting values, leading to undefined steps. [\#39](https://github.com/brightcove/brine/issues/39)
107
+
108
+ **Closed issues:**
109
+
110
+ - RFC: Temple expansions everywhere [\#19](https://github.com/brightcove/brine/issues/19)
111
+ - Selectors for list membership [\#37](https://github.com/brightcove/brine/issues/37)
112
+ - replace jsonpath with object traversal [\#5](https://github.com/brightcove/brine/issues/5)
113
+ - support regex in including [\#3](https://github.com/brightcove/brine/issues/3)
114
+
115
+ **Merged pull requests:**
116
+
117
+ - Add all selector [\#53](https://github.com/brightcove/brine/pull/53) ([mwhipple](https://github.com/mwhipple))
118
+ - Improved path traversal and any selector \(Fix \#37\) [\#52](https://github.com/brightcove/brine/pull/52) ([mwhipple](https://github.com/mwhipple))
119
+ - Support for regexp and is\_matching assertion \(Fix \#3\) [\#51](https://github.com/brightcove/brine/pull/51) ([mwhipple](https://github.com/mwhipple))
120
+
121
+ ## [0.2.0](https://github.com/brightcove/brine/tree/0.2.0) (2017-06-29)
122
+ [Full Changelog](https://github.com/brightcove/brine/compare/0.1.0...0.2.0)
123
+
124
+ **Closed issues:**
125
+
126
+ - Support calling multiple services [\#28](https://github.com/brightcove/brine/issues/28)
127
+
128
+ **Merged pull requests:**
129
+
130
+ - Support multiple clients [\#47](https://github.com/brightcove/brine/pull/47) ([mwhipple](https://github.com/mwhipple))
131
+
132
+ ## [0.1.0](https://github.com/brightcove/brine/tree/0.1.0) (2017-06-26)
133
+ **Fixed bugs:**
134
+
135
+ - replaced\_with fights with step transformation [\#30](https://github.com/brightcove/brine/issues/30)
136
+ - Whitespace transform can overflow the stack [\#23](https://github.com/brightcove/brine/issues/23)
137
+
138
+ **Closed issues:**
139
+
140
+ - RFC: Subject selection in assertions [\#26](https://github.com/brightcove/brine/issues/26)
141
+ - Define deprecation policy [\#25](https://github.com/brightcove/brine/issues/25)
142
+ - Add Guard to Rake [\#20](https://github.com/brightcove/brine/issues/20)
143
+ - RFC: Flipped data comparison [\#18](https://github.com/brightcove/brine/issues/18)
144
+ - RFC: Prefer JSON deserialization over tables [\#17](https://github.com/brightcove/brine/issues/17)
145
+ - construction of deeper request values. [\#16](https://github.com/brightcove/brine/issues/16)
146
+ - README [\#11](https://github.com/brightcove/brine/issues/11)
147
+ - parallelized execution [\#9](https://github.com/brightcove/brine/issues/9)
148
+ - add support for randomization [\#8](https://github.com/brightcove/brine/issues/8)
149
+ - tests [\#7](https://github.com/brightcove/brine/issues/7)
150
+ - replace oauth2 with faraday middleware [\#6](https://github.com/brightcove/brine/issues/6)
151
+ - merge child with non child body matchers [\#4](https://github.com/brightcove/brine/issues/4)
152
+ - register cleanup hook [\#2](https://github.com/brightcove/brine/issues/2)
153
+
154
+ **Merged pull requests:**
155
+
156
+ - Some fixes [\#44](https://github.com/brightcove/brine/pull/44) ([mwhipple](https://github.com/mwhipple))
157
+ - Minor patches [\#41](https://github.com/brightcove/brine/pull/41) ([mwhipple](https://github.com/mwhipple))
158
+ - Add multiline child selector [\#40](https://github.com/brightcove/brine/pull/40) ([mwhipple](https://github.com/mwhipple))
159
+ - Switch DateTime to Time for more flexibility [\#36](https://github.com/brightcove/brine/pull/36) ([mwhipple](https://github.com/mwhipple))
160
+ - `include` assertion; multiline structure transforms [\#35](https://github.com/brightcove/brine/pull/35) ([mwhipple](https://github.com/mwhipple))
161
+ - \[WIP\] Support for dates; deprecation; selector and assertion split [\#29](https://github.com/brightcove/brine/pull/29) ([mwhipple](https://github.com/mwhipple))
162
+ - Adjust regex for multiline string; bind response directly [\#24](https://github.com/brightcove/brine/pull/24) ([mwhipple](https://github.com/mwhipple))
163
+ - initial request construction extraction and clearing of state [\#22](https://github.com/brightcove/brine/pull/22) ([mwhipple](https://github.com/mwhipple))
164
+ - Add Guard \(Fix \#20\) [\#21](https://github.com/brightcove/brine/pull/21) ([mwhipple](https://github.com/mwhipple))
165
+ - Add README [\#12](https://github.com/brightcove/brine/pull/12) ([mwhipple](https://github.com/mwhipple))
166
+ - Initial extraction; Fix \#6 [\#1](https://github.com/brightcove/brine/pull/1) ([mwhipple](https://github.com/mwhipple))
167
+
168
+
169
+
170
+ \* *This Change Log was automatically generated by [github_changelog_generator](https://github.com/skywinder/Github-Changelog-Generator)*
data/Gemfile.lock CHANGED
@@ -1,28 +1,28 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- brine-dsl (0.6.0.pre.SNAPSHOT)
4
+ brine-dsl (0.7.0)
5
5
  cucumber (~> 2.4)
6
- faraday
7
- faraday_middleware
8
- jsonpath
9
- mustache
10
- oauth2
11
- rspec
6
+ faraday (~> 0.12)
7
+ faraday_middleware (~> 0.12)
8
+ jsonpath (~> 0.8)
9
+ mustache (~> 1.0)
10
+ oauth2 (~> 1.4)
11
+ rspec (~> 3.7)
12
12
 
13
13
  GEM
14
14
  remote: http://rubygems.org/
15
15
  specs:
16
- aruba (0.14.2)
17
- childprocess (~> 0.5.6)
16
+ aruba (0.14.5)
17
+ childprocess (>= 0.6.3, < 0.10.0)
18
18
  contracts (~> 0.9)
19
19
  cucumber (>= 1.3.19)
20
20
  ffi (~> 1.9.10)
21
21
  rspec-expectations (>= 2.99)
22
22
  thor (~> 0.19)
23
- asciidoctor (1.5.6.1)
23
+ asciidoctor (1.5.6.2)
24
24
  builder (3.2.3)
25
- childprocess (0.5.9)
25
+ childprocess (0.9.0)
26
26
  ffi (~> 1.0, >= 1.0.11)
27
27
  coderay (1.1.2)
28
28
  contracts (0.16.0)
@@ -42,13 +42,13 @@ GEM
42
42
  multipart-post (>= 1.2, < 3)
43
43
  faraday_middleware (0.12.2)
44
44
  faraday (>= 0.7.4, < 1.0)
45
- ffi (1.9.18)
45
+ ffi (1.9.23)
46
46
  formatador (0.2.5)
47
47
  gherkin (4.1.3)
48
- guard (2.14.1)
48
+ guard (2.14.2)
49
49
  formatador (>= 0.2.4)
50
50
  listen (>= 2.7, < 4.0)
51
- lumberjack (~> 1.0)
51
+ lumberjack (>= 1.0.12, < 2.0)
52
52
  nenv (~> 0.1)
53
53
  notiffany (~> 0.0)
54
54
  pry (>= 0.9.12)
@@ -59,7 +59,7 @@ GEM
59
59
  cucumber (~> 2.0)
60
60
  guard-compat (~> 1.0)
61
61
  nenv (~> 0.1)
62
- jsonpath (0.8.11)
62
+ jsonpath (0.9.0)
63
63
  multi_json
64
64
  to_regexp (~> 0.2.1)
65
65
  jwt (1.5.6)
@@ -67,9 +67,9 @@ GEM
67
67
  rb-fsevent (~> 0.9, >= 0.9.4)
68
68
  rb-inotify (~> 0.9, >= 0.9.7)
69
69
  ruby_dep (~> 1.2)
70
- lumberjack (1.0.12)
70
+ lumberjack (1.0.13)
71
71
  method_source (0.9.0)
72
- multi_json (1.12.2)
72
+ multi_json (1.13.1)
73
73
  multi_test (0.1.2)
74
74
  multi_xml (0.6.0)
75
75
  multipart-post (2.0.0)
@@ -87,9 +87,9 @@ GEM
87
87
  pry (0.11.3)
88
88
  coderay (~> 1.1.0)
89
89
  method_source (~> 0.9.0)
90
- rack (2.0.4)
91
- rake (12.3.0)
92
- rb-fsevent (0.10.2)
90
+ rack (2.0.5)
91
+ rake (12.3.1)
92
+ rb-fsevent (0.10.3)
93
93
  rb-inotify (0.9.10)
94
94
  ffi (>= 0.5.0, < 2)
95
95
  rspec (3.7.0)
@@ -104,7 +104,7 @@ GEM
104
104
  rspec-mocks (3.7.0)
105
105
  diff-lcs (>= 1.2.0, < 2.0)
106
106
  rspec-support (~> 3.7.0)
107
- rspec-support (3.7.0)
107
+ rspec-support (3.7.1)
108
108
  ruby_dep (1.5.0)
109
109
  shellany (0.0.1)
110
110
  thor (0.20.0)
@@ -114,12 +114,12 @@ PLATFORMS
114
114
  ruby
115
115
 
116
116
  DEPENDENCIES
117
- aruba!
118
- asciidoctor!
117
+ aruba (~> 0.14)!
118
+ asciidoctor (~> 1.5)!
119
119
  brine-dsl!
120
- guard!
121
- guard-cucumber!
122
- rake!
120
+ guard (~> 2.14)!
121
+ guard-cucumber (~> 2.1)!
122
+ rake (~> 12.3)!
123
123
 
124
124
  BUNDLED WITH
125
- 1.16.0
125
+ 1.16.1
data/Rakefile CHANGED
@@ -31,5 +31,6 @@ check - run tests
31
31
  Environment Variables
32
32
  ---
33
33
  WATCH - (guard) automatically rerun tests on file changes
34
+ FEATURE - path to specific cucumber feature to run
34
35
  """
35
36
  end
data/brine-dsl.gemspec CHANGED
@@ -1,7 +1,7 @@
1
1
  # -*- encoding: utf-8 -*-
2
2
  Gem::Specification.new do |s|
3
3
  s.name = 'brine-dsl'
4
- s.version = '0.6.0'
4
+ s.version = '0.7.0'
5
5
  s.platform = Gem::Platform::RUBY
6
6
  s.authors = ["Matt Whipple"]
7
7
  s.email = ["mwhipple@brightcove.com"]
@@ -12,19 +12,19 @@ Gem::Specification.new do |s|
12
12
 
13
13
  s.required_ruby_version = '>= 2.3.0'
14
14
 
15
- s.add_runtime_dependency 'cucumber', '~> 2.4'
16
- s.add_runtime_dependency 'mustache'
17
- s.add_runtime_dependency 'oauth2'
18
- s.add_runtime_dependency 'rspec'
19
- s.add_runtime_dependency 'jsonpath'
20
- s.add_runtime_dependency 'faraday'
21
- s.add_runtime_dependency 'faraday_middleware'
15
+ s.add_runtime_dependency 'cucumber', '~> 2.4'
16
+ s.add_runtime_dependency 'mustache', '~> 1.0'
17
+ s.add_runtime_dependency 'oauth2', '~> 1.4'
18
+ s.add_runtime_dependency 'rspec', '~> 3.7'
19
+ s.add_runtime_dependency 'jsonpath', '~> 0.8'
20
+ s.add_runtime_dependency 'faraday', '~> 0.12'
21
+ s.add_runtime_dependency 'faraday_middleware', '~> 0.12'
22
22
 
23
- s.add_development_dependency 'rake'
24
- s.add_development_dependency 'aruba'
25
- s.add_development_dependency 'guard'
26
- s.add_development_dependency 'guard-cucumber'
27
- s.add_development_dependency 'asciidoctor'
23
+ s.add_development_dependency 'rake', '~> 12.3'
24
+ s.add_development_dependency 'aruba', '~> 0.14'
25
+ s.add_development_dependency 'guard', '~> 2.14'
26
+ s.add_development_dependency 'guard-cucumber', '~> 2.1'
27
+ s.add_development_dependency 'asciidoctor', '~> 1.5'
28
28
 
29
29
  s.files = `git ls-files`.split("\n")
30
30
  s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
data/docs/cookbook.html CHANGED
@@ -628,7 +628,7 @@ Cucumber behavior so that the full test suite can be more stochastic
628
628
  </div>
629
629
  <div id="footer">
630
630
  <div id="footer-text">
631
- Last updated 2018-02-08 14:37:47 EST
631
+ Last updated 2018-05-30 12:01:52 EDT
632
632
  </div>
633
633
  </div>
634
634
  </body>
data/docs/guide.html CHANGED
@@ -1105,6 +1105,11 @@ which the step was evaluated.</p>
1105
1105
  (such as booleans or numbers) will always return false. Null is treated as an empty
1106
1106
  value so that it can be treated as such for endpoints that return null in place of empty collections, and non-null empty values can easily be tested for using conjunction.</p>
1107
1107
  </dd>
1108
+ <dt class="hdlist1"><code>Then it is of length `$VALUE`</code></dt>
1109
+ <dd>
1110
+ <p> Assert that the value exposes a length attribute and the value of that
1111
+ attribute is <code>VALUE</code>.</p>
1112
+ </dd>
1108
1113
  <dt class="hdlist1"><code>Then it is a valid `$TYPE`</code></dt>
1109
1114
  <dd>
1110
1115
  <p> Assert that the selected value is a valid instance of a <code>TYPE</code>. Presently this
@@ -1142,7 +1147,7 @@ wiring and documentation. The current supported types are:</p>
1142
1147
  </div>
1143
1148
  <div id="footer">
1144
1149
  <div id="footer-text">
1145
- Last updated 2018-02-08 12:09:12 EST
1150
+ Last updated 2018-05-30 12:55:31 EDT
1146
1151
  </div>
1147
1152
  </div>
1148
1153
  </body>
data/docs/index.html CHANGED
@@ -465,7 +465,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
465
465
  </div>
466
466
  <div id="footer">
467
467
  <div id="footer-text">
468
- Last updated 2017-10-17 16:14:35 EDT
468
+ Last updated 2018-05-30 12:01:52 EDT
469
469
  </div>
470
470
  </div>
471
471
  </body>
data/docs/specs.html CHANGED
@@ -452,6 +452,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
452
452
  <li><a href="#__span_class_feature_name_matching_span"><span class="feature name">Matching</span></a></li>
453
453
  <li><a href="#__span_class_feature_name_including_span"><span class="feature name">Including</span></a></li>
454
454
  <li><a href="#__span_class_feature_name_empty_span"><span class="feature name">Empty</span></a></li>
455
+ <li><a href="#__span_class_feature_name_of_length_span"><span class="feature name">Of Length</span></a></li>
455
456
  <li><a href="#__span_class_feature_name_a_valid_span"><span class="feature name">A valid &#8230;&#8203;</span></a></li>
456
457
  </ul>
457
458
  </li>
@@ -1400,7 +1401,7 @@ And the value of the response body is not matching `blah`</code></pre>
1400
1401
  <p>It can be asserted that a value is a superset of another value.</p>
1401
1402
  </div>
1402
1403
  <div class="sect3">
1403
- <h4 id="__span_class_scenario_name_equals_span"><span class="scenario name">Equals</span></h4>
1404
+ <h4 id="__span_class_scenario_name_includes_span"><span class="scenario name">Includes</span></h4>
1404
1405
  <div class="ulist step-list">
1405
1406
  <ul>
1406
1407
  <li>
@@ -1425,7 +1426,10 @@ Then the value of the response body is including:
1425
1426
  And the value of the response body is not including:
1426
1427
  """
1427
1428
  {"missing":"value"}
1428
- """</code></pre>
1429
+ """
1430
+ And the value of the response body is including `other`
1431
+ And the value of the response body is not including `brother`
1432
+ And the value of the response body is not including `value`</code></pre>
1429
1433
  </div>
1430
1434
  </div>
1431
1435
  <div class="ulist">
@@ -1546,6 +1550,76 @@ Then the value of the response body is not empty</code></pre>
1546
1550
  </div>
1547
1551
  </div>
1548
1552
  <div class="sect2">
1553
+ <h3 id="__span_class_feature_name_of_length_span"><span class="feature name">Of Length</span></h3>
1554
+ <div class="paragraph">
1555
+ <p>It can be asserted that a value has a provided length.</p>
1556
+ </div>
1557
+ <div class="sect3">
1558
+ <h4 id="__span_class_scenario_name_has_length_span"><span class="scenario name">Has Length</span></h4>
1559
+ <div class="ulist step-list">
1560
+ <ul>
1561
+ <li>
1562
+ <p><strong>Given</strong> a file named "features/has_length.feature" with:</p>
1563
+ </li>
1564
+ </ul>
1565
+ </div>
1566
+ <div class="listingblock">
1567
+ <div class="content">
1568
+ <pre class="highlightjs highlight"><code class="language-gherkin" data-lang="gherkin">Feature: Has Length
1569
+ Scenario: String
1570
+ When the response body is assigned:
1571
+ """
1572
+ blah
1573
+ """
1574
+ Then the value of the response body is of length `4`
1575
+
1576
+ Scenario: Array
1577
+ When the response body is assigned:
1578
+ """
1579
+ ["foo", "blah"]
1580
+ """
1581
+ Then the value of the response body is of length `2`
1582
+
1583
+ Scenario: Map
1584
+ When the response body is assigned:
1585
+ """
1586
+ {"foo": "blah"}
1587
+ """
1588
+ Then the value of the response body is of length `1`
1589
+
1590
+ Scenario: Value without length attribute
1591
+ When the response body is assigned:
1592
+ """
1593
+ true
1594
+ """
1595
+ Then the value of the response body is not of length `1`</code></pre>
1596
+ </div>
1597
+ </div>
1598
+ <div class="ulist">
1599
+ <ul>
1600
+ <li>
1601
+ <p><strong>When</strong> I run <code>cucumber features/has_length.feature</code></p>
1602
+ </li>
1603
+ <li>
1604
+ <p><strong>Then</strong> the output should contain:</p>
1605
+ </li>
1606
+ </ul>
1607
+ </div>
1608
+ <div class="listingblock">
1609
+ <div class="content">
1610
+ <pre class="highlightjs highlight"><code class="language-gherkin" data-lang="gherkin">4 passed</code></pre>
1611
+ </div>
1612
+ </div>
1613
+ <div class="ulist">
1614
+ <ul>
1615
+ <li>
1616
+ <p><strong>And</strong> it should pass</p>
1617
+ </li>
1618
+ </ul>
1619
+ </div>
1620
+ </div>
1621
+ </div>
1622
+ <div class="sect2">
1549
1623
  <h3 id="__span_class_feature_name_a_valid_span"><span class="feature name">A valid &#8230;&#8203;</span></h3>
1550
1624
  <div class="sect3">
1551
1625
  <h4 id="__span_class_scenario_name_positive_and_negative_assertions_for_json_types_span"><span class="scenario name">Positive and negative assertions for JSON types.</span></h4>
@@ -1759,7 +1833,7 @@ Then the value of the response body children `.val` has elements which are all a
1759
1833
  </div>
1760
1834
  <div id="footer">
1761
1835
  <div id="footer-text">
1762
- Last updated 2018-02-08 12:09:12 EST
1836
+ Last updated 2018-05-30 13:07:46 EDT
1763
1837
  </div>
1764
1838
  </div>
1765
1839
  </body>
data/docs/src/guide.adoc CHANGED
@@ -413,6 +413,10 @@ _see <<_selection_and_assertion>>_
413
413
  (such as booleans or numbers) will always return false. Null is treated as an empty
414
414
  value so that it can be treated as such for endpoints that return null in place of empty collections, and non-null empty values can easily be tested for using conjunction.
415
415
 
416
+ `Then it is of length {grave}$VALUE{grave}`::
417
+ Assert that the value exposes a length attribute and the value of that
418
+ attribute is `VALUE`.
419
+
416
420
  `Then it is a valid {grave}$TYPE{grave}`::
417
421
  Assert that the selected value is a valid instance of a `TYPE`. Presently this
418
422
  is focused on standard data types (intially based on those specified by JSON),
data/docs/src/specs.adoc CHANGED
@@ -22,4 +22,5 @@ gherkin::../../features/assertions/is_equal_to.feature[spec.erb]
22
22
  gherkin::../../features/assertions/is_matching.feature[spec.erb]
23
23
  gherkin::../../features/assertions/is_including.feature[spec.erb]
24
24
  gherkin::../../features/assertions/is_empty.feature[spec.erb]
25
+ gherkin::../../features/assertions/is_of_length.feature[spec.erb]
25
26
  gherkin::../../features/assertions/is_a_valid.feature[spec.erb]
@@ -1,9 +1,10 @@
1
1
  Feature: Including
2
2
  It can be asserted that a value is a superset of another value.
3
3
 
4
- Scenario: Equals
4
+ Scenario: Includes
5
5
  Given a file named "features/includes.feature" with:
6
6
  """
7
+
7
8
  Feature: Includes
8
9
  Scenario: Basic object membership
9
10
  When the response body is assigned:
@@ -20,6 +21,10 @@ Feature: Includes
20
21
  \"\"\"
21
22
  {"missing":"value"}
22
23
  \"\"\"
24
+ And the value of the response body is including `other`
25
+ And the value of the response body is not including `brother`
26
+ And the value of the response body is not including `value`
27
+
23
28
  """
24
29
  When I run `cucumber features/includes.feature`
25
30
  Then the output should contain:
@@ -0,0 +1,43 @@
1
+ Feature: Of Length
2
+ It can be asserted that a value has a provided length.
3
+
4
+ Scenario: Has Length
5
+ Given a file named "features/has_length.feature" with:
6
+ """
7
+
8
+ Feature: Has Length
9
+ Scenario: String
10
+ When the response body is assigned:
11
+ \"\"\"
12
+ blah
13
+ \"\"\"
14
+ Then the value of the response body is of length `4`
15
+
16
+ Scenario: Array
17
+ When the response body is assigned:
18
+ \"\"\"
19
+ ["foo", "blah"]
20
+ \"\"\"
21
+ Then the value of the response body is of length `2`
22
+
23
+ Scenario: Map
24
+ When the response body is assigned:
25
+ \"\"\"
26
+ {"foo": "blah"}
27
+ \"\"\"
28
+ Then the value of the response body is of length `1`
29
+
30
+ Scenario: Value without length attribute
31
+ When the response body is assigned:
32
+ \"\"\"
33
+ true
34
+ \"\"\"
35
+ Then the value of the response body is not of length `1`
36
+
37
+ """
38
+ When I run `cucumber features/has_length.feature`
39
+ Then the output should contain:
40
+ """
41
+ 4 passed
42
+ """
43
+ And it should pass
@@ -42,3 +42,9 @@ end
42
42
  Then(/^it is a valid `([^`]*)`$/) do |type|
43
43
  selector.assert_that(type) {|t| type_check_for(t) }
44
44
  end
45
+
46
+ Then(/^it is of length `([^`]*)`$/) do |length|
47
+ selector.assert_that(length) do |l|
48
+ satisfy{|i| i.respond_to?(:length) && i.length == l}
49
+ end
50
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: brine-dsl
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 0.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matt Whipple
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-02-08 00:00:00.000000000 Z
11
+ date: 2018-05-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cucumber
@@ -28,156 +28,156 @@ dependencies:
28
28
  name: mustache
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ">="
31
+ - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '0'
33
+ version: '1.0'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - ">="
38
+ - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: '0'
40
+ version: '1.0'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: oauth2
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - ">="
45
+ - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: '0'
47
+ version: '1.4'
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - ">="
52
+ - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: '0'
54
+ version: '1.4'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: rspec
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - ">="
59
+ - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: '0'
61
+ version: '3.7'
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - ">="
66
+ - - "~>"
67
67
  - !ruby/object:Gem::Version
68
- version: '0'
68
+ version: '3.7'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: jsonpath
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - ">="
73
+ - - "~>"
74
74
  - !ruby/object:Gem::Version
75
- version: '0'
75
+ version: '0.8'
76
76
  type: :runtime
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - ">="
80
+ - - "~>"
81
81
  - !ruby/object:Gem::Version
82
- version: '0'
82
+ version: '0.8'
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: faraday
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
- - - ">="
87
+ - - "~>"
88
88
  - !ruby/object:Gem::Version
89
- version: '0'
89
+ version: '0.12'
90
90
  type: :runtime
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
- - - ">="
94
+ - - "~>"
95
95
  - !ruby/object:Gem::Version
96
- version: '0'
96
+ version: '0.12'
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: faraday_middleware
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
- - - ">="
101
+ - - "~>"
102
102
  - !ruby/object:Gem::Version
103
- version: '0'
103
+ version: '0.12'
104
104
  type: :runtime
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
- - - ">="
108
+ - - "~>"
109
109
  - !ruby/object:Gem::Version
110
- version: '0'
110
+ version: '0.12'
111
111
  - !ruby/object:Gem::Dependency
112
112
  name: rake
113
113
  requirement: !ruby/object:Gem::Requirement
114
114
  requirements:
115
- - - ">="
115
+ - - "~>"
116
116
  - !ruby/object:Gem::Version
117
- version: '0'
117
+ version: '12.3'
118
118
  type: :development
119
119
  prerelease: false
120
120
  version_requirements: !ruby/object:Gem::Requirement
121
121
  requirements:
122
- - - ">="
122
+ - - "~>"
123
123
  - !ruby/object:Gem::Version
124
- version: '0'
124
+ version: '12.3'
125
125
  - !ruby/object:Gem::Dependency
126
126
  name: aruba
127
127
  requirement: !ruby/object:Gem::Requirement
128
128
  requirements:
129
- - - ">="
129
+ - - "~>"
130
130
  - !ruby/object:Gem::Version
131
- version: '0'
131
+ version: '0.14'
132
132
  type: :development
133
133
  prerelease: false
134
134
  version_requirements: !ruby/object:Gem::Requirement
135
135
  requirements:
136
- - - ">="
136
+ - - "~>"
137
137
  - !ruby/object:Gem::Version
138
- version: '0'
138
+ version: '0.14'
139
139
  - !ruby/object:Gem::Dependency
140
140
  name: guard
141
141
  requirement: !ruby/object:Gem::Requirement
142
142
  requirements:
143
- - - ">="
143
+ - - "~>"
144
144
  - !ruby/object:Gem::Version
145
- version: '0'
145
+ version: '2.14'
146
146
  type: :development
147
147
  prerelease: false
148
148
  version_requirements: !ruby/object:Gem::Requirement
149
149
  requirements:
150
- - - ">="
150
+ - - "~>"
151
151
  - !ruby/object:Gem::Version
152
- version: '0'
152
+ version: '2.14'
153
153
  - !ruby/object:Gem::Dependency
154
154
  name: guard-cucumber
155
155
  requirement: !ruby/object:Gem::Requirement
156
156
  requirements:
157
- - - ">="
157
+ - - "~>"
158
158
  - !ruby/object:Gem::Version
159
- version: '0'
159
+ version: '2.1'
160
160
  type: :development
161
161
  prerelease: false
162
162
  version_requirements: !ruby/object:Gem::Requirement
163
163
  requirements:
164
- - - ">="
164
+ - - "~>"
165
165
  - !ruby/object:Gem::Version
166
- version: '0'
166
+ version: '2.1'
167
167
  - !ruby/object:Gem::Dependency
168
168
  name: asciidoctor
169
169
  requirement: !ruby/object:Gem::Requirement
170
170
  requirements:
171
- - - ">="
171
+ - - "~>"
172
172
  - !ruby/object:Gem::Version
173
- version: '0'
173
+ version: '1.5'
174
174
  type: :development
175
175
  prerelease: false
176
176
  version_requirements: !ruby/object:Gem::Requirement
177
177
  requirements:
178
- - - ">="
178
+ - - "~>"
179
179
  - !ruby/object:Gem::Version
180
- version: '0'
180
+ version: '1.5'
181
181
  description: Cucumber@REST in Brine
182
182
  email:
183
183
  - mwhipple@brightcove.com
@@ -188,6 +188,7 @@ files:
188
188
  - ".gitignore"
189
189
  - ".ruby-version"
190
190
  - ".travis.yml"
191
+ - CHANGELOG.md
191
192
  - Gemfile
192
193
  - Gemfile.lock
193
194
  - Guardfile
@@ -224,6 +225,7 @@ files:
224
225
  - features/assertions/is_equal_to.feature
225
226
  - features/assertions/is_including.feature
226
227
  - features/assertions/is_matching.feature
228
+ - features/assertions/is_of_length.feature
227
229
  - features/deprecations/replaced_with.feature
228
230
  - features/request_construction/basic.feature
229
231
  - features/request_construction/body.feature
@@ -295,6 +297,7 @@ test_files:
295
297
  - features/assertions/is_equal_to.feature
296
298
  - features/assertions/is_including.feature
297
299
  - features/assertions/is_matching.feature
300
+ - features/assertions/is_of_length.feature
298
301
  - features/deprecations/replaced_with.feature
299
302
  - features/request_construction/basic.feature
300
303
  - features/request_construction/body.feature