macros4cuke 0.3.26 → 0.3.27
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.md +4 -0
- data/lib/macros4cuke/constants.rb +1 -1
- data/spec/macros4cuke/templating/engine_spec.rb +0 -16
- metadata +2 -2
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,7 @@
|
|
1
|
+
### 0.3.27 / 2013-05-31
|
2
|
+
* [FIX] `engine_spec.rb`: Removal of a comment in sample template.
|
3
|
+
* [CHANGE] `engine_spec.rb`: Removal of an useless test.
|
4
|
+
|
1
5
|
### 0.3.26 / 2013-05-31
|
2
6
|
* [CHANGE] All RSpec files: migrated to the expect syntax instead of the should syntax.
|
3
7
|
* [CHANGE] `spec_helper.rb`: RSpec is configured to allow the expect syntax only.
|
@@ -17,7 +17,6 @@ describe Engine do
|
|
17
17
|
let(:sample_template) do
|
18
18
|
source = <<-SNIPPET
|
19
19
|
Given I landed in the homepage
|
20
|
-
# The credentials are entered here
|
21
20
|
And I fill in "Username" with "<userid>"
|
22
21
|
And I fill in "Password" with "<password>"
|
23
22
|
And I click "Sign in"
|
@@ -260,26 +259,16 @@ SNIPPET
|
|
260
259
|
end
|
261
260
|
|
262
261
|
|
263
|
-
it 'should ignore variables/placeholders in comments' do
|
264
|
-
substeps = " # Comment 1 <miscellaneous>\n" + sample_template
|
265
|
-
substeps += " #\n Comment 2 <haphazard>"
|
266
|
-
instance = Engine.new substeps
|
267
|
-
# expect(instance.variables).to eq([:userid, :password])
|
268
|
-
end
|
269
|
-
|
270
|
-
|
271
262
|
it 'should render the text given the actuals' do
|
272
263
|
locals = { 'userid' => 'johndoe' }
|
273
264
|
|
274
265
|
rendered_text = subject.render(Object.new, locals)
|
275
266
|
expected = <<-SNIPPET
|
276
267
|
Given I landed in the homepage
|
277
|
-
# The credentials are entered here
|
278
268
|
And I fill in "Username" with "johndoe"
|
279
269
|
And I fill in "Password" with ""
|
280
270
|
And I click "Sign in"
|
281
271
|
SNIPPET
|
282
|
-
|
283
272
|
expect(rendered_text).to eq(expected)
|
284
273
|
|
285
274
|
# Case of an actual that's not a String
|
@@ -287,22 +276,18 @@ SNIPPET
|
|
287
276
|
rendered_text = subject.render(Object.new, locals)
|
288
277
|
expected = <<-SNIPPET
|
289
278
|
Given I landed in the homepage
|
290
|
-
# The credentials are entered here
|
291
279
|
And I fill in "Username" with "johndoe"
|
292
280
|
And I fill in "Password" with "12345"
|
293
281
|
And I click "Sign in"
|
294
282
|
SNIPPET
|
295
|
-
|
296
283
|
expect(rendered_text).to eq(expected)
|
297
284
|
|
298
|
-
|
299
285
|
# Place actual value in context object
|
300
286
|
Context = Struct.new(:userid, :password)
|
301
287
|
context = Context.new('sherlock', 'holmes')
|
302
288
|
rendered_text = subject.render(context, { 'userid' => 'susan' })
|
303
289
|
expected = <<-SNIPPET
|
304
290
|
Given I landed in the homepage
|
305
|
-
# The credentials are entered here
|
306
291
|
And I fill in "Username" with "susan"
|
307
292
|
And I fill in "Password" with "holmes"
|
308
293
|
And I click "Sign in"
|
@@ -356,7 +341,6 @@ SNIPPET
|
|
356
341
|
rendered_text = subject.render(Object.new, locals)
|
357
342
|
expected = <<-SNIPPET
|
358
343
|
Given I landed in the homepage
|
359
|
-
# The credentials are entered here
|
360
344
|
And I fill in "Username" with "johndoe<br/>yeti"
|
361
345
|
And I fill in "Password" with ""
|
362
346
|
And I click "Sign in"
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: macros4cuke
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.27
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-
|
12
|
+
date: 2013-06-02 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: cucumber
|