macros4cuke 0.4.08 → 0.4.09

Sign up to get free protection for your applications and to get access to all the features.
Files changed (49) hide show
  1. checksums.yaml +8 -8
  2. data/.rubocop.yml +3 -0
  3. data/.travis.yml +6 -0
  4. data/CHANGELOG.md +4 -0
  5. data/README.md +5 -3
  6. data/features/{1_Basics → 1_the_basics}/README.md +0 -0
  7. data/features/{1_Basics → 1_the_basics}/demo01.feature +5 -5
  8. data/features/{2_Macros_with_arguments → 2_macros_with_arguments}/README.md +0 -0
  9. data/features/{2_Macros_with_arguments → 2_macros_with_arguments}/demo02.feature +10 -10
  10. data/features/{2_Macros_with_arguments → 2_macros_with_arguments}/demo03.feature +5 -5
  11. data/features/{3_Macros_with_table_arguments → 3_macros_with_table_arguments}/README.md +0 -0
  12. data/features/{3_Macros_with_table_arguments → 3_macros_with_table_arguments}/demo04.feature +5 -5
  13. data/features/{3_Macros_with_table_arguments → 3_macros_with_table_arguments}/demo05.feature +4 -4
  14. data/features/{4_Conditional_steps → 4_conditional_steps}/demo06.feature +18 -16
  15. data/features/{5_Goodies → 5_goodies}/demo07.feature +6 -5
  16. data/features/{5_Goodies → 5_goodies}/demo08.feature +0 -0
  17. data/features/step_definitions/demo_steps.rb +5 -4
  18. data/lib/macro_steps.rb +6 -6
  19. data/lib/macros4cuke/coll-walker-factory.rb +12 -12
  20. data/lib/macros4cuke/constants.rb +4 -4
  21. data/lib/macros4cuke/formatter/all-notifications.rb +8 -8
  22. data/lib/macros4cuke/formatter/to-gherkin.rb +2 -2
  23. data/lib/macros4cuke/formatter/to-null.rb +10 -10
  24. data/lib/macros4cuke/formatting-service.rb +74 -74
  25. data/lib/macros4cuke/macro-collection.rb +13 -13
  26. data/lib/macros4cuke/macro-step-support.rb +19 -12
  27. data/lib/macros4cuke/macro-step.rb +48 -48
  28. data/lib/macros4cuke/templating/engine.rb +79 -79
  29. data/lib/macros4cuke/templating/placeholder.rb +52 -52
  30. data/lib/macros4cuke/templating/section.rb +116 -116
  31. data/lib/macros4cuke/templating/template-element.rb +88 -88
  32. data/lib/macros4cuke/templating/unary-element.rb +37 -37
  33. data/lib/macros4cuke.rb +1 -1
  34. data/spec/macros4cuke/coll-walker-factory_spec.rb +269 -269
  35. data/spec/macros4cuke/formatter/to-gherkin_spec.rb +5 -5
  36. data/spec/macros4cuke/formatter/to-null_spec.rb +62 -62
  37. data/spec/macros4cuke/formatter/to-trace_spec.rb +8 -8
  38. data/spec/macros4cuke/formatting-service_spec.rb +7 -7
  39. data/spec/macros4cuke/macro-collection_spec.rb +3 -3
  40. data/spec/macros4cuke/macro-step-support_spec.rb +4 -4
  41. data/spec/macros4cuke/macro-step_spec.rb +8 -8
  42. data/spec/macros4cuke/templating/comment_spec.rb +45 -0
  43. data/spec/macros4cuke/templating/engine_spec.rb +23 -23
  44. data/spec/macros4cuke/templating/eo-line_spec.rb +39 -0
  45. data/spec/macros4cuke/templating/section_spec.rb +1 -1
  46. data/spec/macros4cuke/templating/static_text_spec.rb +45 -0
  47. data/spec/macros4cuke/use-sample-collection.rb +7 -7
  48. data/spec/spec_helper.rb +3 -3
  49. metadata +31 -14
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- MjExN2JjMDk1OTE2MDAyODlmNzFlYjU5MjBhNzBjM2U3MTYwNjA1MA==
4
+ NzVhNDZmNmRmNzk0MDExYTMzOGM2NTVhNzA1OGEyOWNkZmNkZmRjYw==
5
5
  data.tar.gz: !binary |-
6
- M2NhYzE4ZjkxOGExNGZkODNjYTI0YWEyYTA0MzJiY2I4MzkwNzdjOA==
6
+ ZmM2MDc4NzJkODk0YzkyZjVlOTdlZGZlMThjZGQzNTg5ODRmOGE5OA==
7
7
  !binary "U0hBNTEy":
8
8
  metadata.gz: !binary |-
9
- MDliNGIyNDBmZjhlOGNjMjg2ZjRhNGRiZWY0NjM2ZTc2N2IzMzUxNTg1Mzgz
10
- NGE3OTVkMTM3YzMyMTc1MTQwODk3YjhjMzdhOWQzMmNjNDE5MjE1MjIzOGEx
11
- NmY0NjIwM2ExMzBkOTBmNDg1YWMyYTU3YmM1ZWNjOGYwNDYxMjQ=
9
+ ZGZkZjkxZGRlMzRiMGNkMGVhOWVlZmFlMWIzZTk0YjcyYTYzY2Y5OTU1YzQw
10
+ NzFiYWE3Nzg1MDg2MThkYzk3NTQ2ODE2MzYzYzMyNGVkMmY4ZGQ5NDYwNWYx
11
+ MTJjNzViYzVmMjQwOGY4NTM5Yzk4NWE4NmZjZjM5MDYyMTFhNzE=
12
12
  data.tar.gz: !binary |-
13
- M2QwZjk4ZTA2YTEyYWQxYjNhN2RlNDBkY2M5ZmI0MTM3ODA1YTFkMDQ1MDZl
14
- M2UxNTllM2E1MWUyNTBlYjhhMjg0MzFiNDQ1NTExYmQ2N2NhZjdmZTc1MGFj
15
- YmNhNzQyMzYyMDMwZTE2Y2Y5ZWQwNmE0ZjJiMThmMzUyMjk4MGI=
13
+ ZGFiYjI0NWI3ODdmMTcwMzY5ZmNhM2IwYjY2ZWQ2OTBiMWYyOTFkMjdmNjJk
14
+ YWRhNWMzZTFkYTY2NjkxYTk2OGZiMzY3YjIwY2JkZDZiNTcyOWNiMGQ5ZGE0
15
+ ZjQyMDA0MzQwZGNkMWU3YmIzOWEzMzMwYjVhNzZhMzUwOGRmYzQ=
data/.rubocop.yml CHANGED
@@ -36,6 +36,9 @@ EmptyLinesAroundBody:
36
36
 
37
37
  Encoding:
38
38
  Enabled: false
39
+
40
+ FileName:
41
+ Enabled: false
39
42
 
40
43
  IndentationWidth :
41
44
  Enabled: false
data/.travis.yml CHANGED
@@ -6,6 +6,12 @@ rvm:
6
6
  - 1.9.2
7
7
  - jruby-19mode
8
8
  - jruby-head
9
+ - rbx
10
+
11
+ # Workaround issue of jruby-19mode configuration on Travis CI
12
+ matrix:
13
+ allow_failures:
14
+ - rvm: rbx
9
15
 
10
16
  gemfile:
11
17
  - Gemfile
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ### 0.4.09 / 2014-03-13
2
+ * [CHANGE] Updated source files to comply to Rubocop 0.19.
3
+ * [CHANGE] File `.rubocop.yml`: Disabled FileName cop.
4
+
1
5
  ### 0.4.08 / 2014-02-08
2
6
  * [NEW] Added some tutorial material in [Relish] (https://www.relishapp.com/famished-tiger/macros4cuke/docs)
3
7
  * [CHANGE] `features` dir and feature files re-designed for publishing on Relish website.
data/README.md CHANGED
@@ -1,13 +1,14 @@
1
1
  Macros4Cuke
2
2
  ===========
3
+ _Extend Cucumber with macro-steps._
4
+ [Homepage](https://github.com/famished-tiger/Macros4Cuke)
5
+ [Documentation] (https://www.relishapp.com/famished-tiger/macros4cuke/docs)
6
+
3
7
  [![Build Status](https://travis-ci.org/famished-tiger/Macros4Cuke.png?branch=master)](https://travis-ci.org/famished-tiger/Macros4Cuke)
4
8
  [![Code Climate](https://codeclimate.com/github/famished-tiger/Macros4Cuke.png)](https://codeclimate.com/github/famished-tiger/Macros4Cuke.png)
5
9
  [![Gem Version](https://badge.fury.io/rb/macros4cuke.png)](http://badge.fury.io/rb/macros4cuke)
6
10
  [![Dependency Status](https://gemnasium.com/famished-tiger/Macros4Cuke.png)](https://gemnasium.com/famished-tiger/Macros4Cuke)
7
11
 
8
- _Add macros to your Cucumber scenarios._
9
- [Homepage](https://github.com/famished-tiger/Macros4Cuke)
10
- [Documentation] (https://www.relishapp.com/famished-tiger/macros4cuke/docs)
11
12
 
12
13
  __Macros4Cuke__ is a Cucumber extension that adds a macro facility for your Cucumber scenarios.
13
14
  With it, you can create any new step that replaces a sequence of sub-steps.
@@ -68,6 +69,7 @@ Macros4Cuke not only helps in getting rid of the repeated step sequences,
68
69
  that are closer to the business logic.
69
70
 
70
71
  See also the working examples in the ```features/``` folder.
72
+ Nicely formatted documentation extracted from these feature files is also available on the [Relish website](https://www.relishapp.com/famished-tiger/macros4cuke/docs)
71
73
 
72
74
  ## Setup ##
73
75
  ### Pre-requisites ###
File without changes
@@ -27,9 +27,9 @@ Scenario: Let's use the macro we created above
27
27
  # The next step verifies that the steps from the macro were effectively executed.
28
28
  Then I expect the following step trace:
29
29
  """
30
- Invoked step: ... I landed in the homepage
31
- Invoked step: ... I click "Sign in"
32
- Invoked step: ... I fill in "Username" with "johndoe"
33
- Invoked step: ... I fill in "Password" with "unguessable"
34
- Invoked step: ... I click "Submit"
30
+ Given I landed in the homepage
31
+ When I click "Sign in"
32
+ And I fill in "Username" with "johndoe"
33
+ And I fill in "Password" with "unguessable"
34
+ And I click "Submit"
35
35
  """
@@ -29,11 +29,11 @@ Scenario: Use the macro created above pass it a user id
29
29
  # The next step verifies that the steps from the macro were effectively executed.
30
30
  Then I expect the following step trace:
31
31
  """
32
- Invoked step: ... I landed in the homepage
33
- Invoked step: ... I click "Sign in"
34
- Invoked step: ... I fill in "Username" with "guest"
35
- Invoked step: ... I fill in "Password" with "unguessable"
36
- Invoked step: ... I click "Submit"
32
+ Given I landed in the homepage
33
+ When I click "Sign in"
34
+ And I fill in "Username" with "guest"
35
+ And I fill in "Password" with "unguessable"
36
+ And I click "Submit"
37
37
  """
38
38
 
39
39
 
@@ -43,9 +43,9 @@ Scenario: Use the macro with another user id
43
43
  # The next step verifies that the steps from the macro were effectively executed.
44
44
  Then I expect the following step trace:
45
45
  """
46
- Invoked step: ... I landed in the homepage
47
- Invoked step: ... I click "Sign in"
48
- Invoked step: ... I fill in "Username" with "me-again"
49
- Invoked step: ... I fill in "Password" with "unguessable"
50
- Invoked step: ... I click "Submit"
46
+ Given I landed in the homepage
47
+ When I click "Sign in"
48
+ And I fill in "Username" with "me-again"
49
+ And I fill in "Password" with "unguessable"
50
+ And I click "Submit"
51
51
  """
@@ -26,10 +26,10 @@ Scenario: Using the macro with multiple arguments
26
26
  # The next step verifies that the steps from the macro were effectively executed.
27
27
  Then I expect the following step trace:
28
28
  """
29
- Invoked step: ... I landed in the homepage
30
- Invoked step: ... I click "Sign in"
31
- Invoked step: ... I fill in "Username" with "jdoe"
32
- Invoked step: ... I fill in "Password" with "cosmic"
33
- Invoked step: ... I click "Submit"
29
+ Given I landed in the homepage
30
+ When I click "Sign in"
31
+ And I fill in "Username" with "jdoe"
32
+ And I fill in "Password" with "cosmic"
33
+ And I click "Submit"
34
34
  """
35
35
 
@@ -29,9 +29,9 @@ Scenario: Using the macro we created above
29
29
  # The next step verifies that the steps from the macro were effectively executed.
30
30
  Then I expect the following step trace:
31
31
  """
32
- Invoked step: ... I landed in the homepage
33
- Invoked step: ... I click "Sign in"
34
- Invoked step: ... I fill in "Username" with "guest"
35
- Invoked step: ... I fill in "Password" with "unguessable"
36
- Invoked step: ... I click "Submit"
32
+ Given I landed in the homepage
33
+ When I click "Sign in"
34
+ And I fill in "Username" with "guest"
35
+ And I fill in "Password" with "unguessable"
36
+ And I click "Submit"
37
37
  """
@@ -31,8 +31,8 @@ Scenario: Using the macro we created above
31
31
  # The next step verifies that the steps from the macro were effectively executed.
32
32
  Then I expect the following step trace:
33
33
  """
34
- Invoked step: ... I fill in "location" with "Nowhere-City"
35
- Invoked step: ... I fill in "email" with "nobody@example.com"
36
- Invoked step: ... I fill in "comment" with "First comment line<br/>Second comment line<br/>Third comment line"
37
- Invoked step: ... I click "Save"
34
+ And I fill in "location" with "Nowhere-City"
35
+ And I fill in "email" with "nobody@example.com"
36
+ And I fill in "comment" with "First comment line<br/>Second comment line<br/>Third comment line"
37
+ And I click "Save"
38
38
  """
@@ -47,13 +47,14 @@ Feature: Define conditional substeps in a macro-step.
47
47
  # The next step verifies that the optional steps from the macro were ignored.
48
48
  Then I expect the following step trace:
49
49
  """
50
- Invoked step: ... I fill in "first_name" with "Alice"
51
- Invoked step: ... I fill in "last_name" with "Inn"
52
- Invoked step: ... I fill in "street_address" with "11, No Street"
53
- Invoked step: ... I fill in "zip" with ""
54
- Invoked step: ... I fill in "city" with "Nowhere-City"
55
- Invoked step: ... I fill in "country" with "Wonderland"
56
- Invoked step: ... I click "Save"
50
+ When I fill in "first_name" with "Alice"
51
+ And I fill in "last_name" with "Inn"
52
+ And I fill in "street_address" with "11, No Street"
53
+ And I fill in "zip" with ""
54
+ And I fill in "city" with "Nowhere-City"
55
+ And I fill in "country" with "Wonderland"
56
+
57
+ And I click "Save"
57
58
  """
58
59
 
59
60
 
@@ -72,14 +73,15 @@ Feature: Define conditional substeps in a macro-step.
72
73
  # The next step verifies that the optional steps from the macro were ignored.
73
74
  Then I expect the following step trace:
74
75
  """
75
- Invoked step: ... I fill in "first_name" with "Alice"
76
- Invoked step: ... I fill in "last_name" with "Inn"
77
- Invoked step: ... I fill in "street_address" with "11, No Street"
78
- Invoked step: ... I fill in "zip" with ""
79
- Invoked step: ... I fill in "city" with "Nowhere-City"
80
- Invoked step: ... I fill in "country" with "Wonderland"
81
- Invoked step: ... I fill in "email" with "alice.inn@wonder.land"
82
- Invoked step: ... I fill in "comment" with "No comment!"
83
- Invoked step: ... I click "Save"
76
+ When I fill in "first_name" with "Alice"
77
+ And I fill in "last_name" with "Inn"
78
+ And I fill in "street_address" with "11, No Street"
79
+ And I fill in "zip" with ""
80
+ And I fill in "city" with "Nowhere-City"
81
+ And I fill in "country" with "Wonderland"
82
+ And I fill in "email" with "alice.inn@wonder.land"
83
+
84
+ And I fill in "comment" with "No comment!"
85
+ And I click "Save"
84
86
  """
85
87
 
@@ -21,9 +21,10 @@ Scenario: Invoking the coarse-grained macro
21
21
  # Check that the nested macro still works
22
22
  Then I expect the following step trace:
23
23
  """
24
- Invoked step: ... I landed in the homepage
25
- Invoked step: ... I click "Sign in"
26
- Invoked step: ... I fill in "Username" with "guest"
27
- Invoked step: ... I fill in "Password" with "unguessable"
28
- Invoked step: ... I click "Submit"
24
+ When I [enter my userid "guest" and password "unguessable"]
25
+ Given I landed in the homepage
26
+ When I click "Sign in"
27
+ And I fill in "Username" with "guest"
28
+ And I fill in "Password" with "unguessable"
29
+ And I click "Submit"
29
30
  """
File without changes
@@ -2,21 +2,22 @@
2
2
  # A few step definitions for demo and testing purpose.
3
3
 
4
4
  When(/^I landed in the homepage$/) do
5
- trace_steps << 'Invoked step: ... I landed in the homepage'
5
+ #trace_steps << 'Invoked step: ... I landed in the homepage'
6
6
  end
7
7
 
8
8
  When(/^I click "([^"]*)"$/) do |element|
9
- trace_steps << "Invoked step: ... I click \"#{element}\""
9
+ #trace_steps << "Invoked step: ... I click \"#{element}\""
10
10
  end
11
11
 
12
12
 
13
13
  When(/^I fill in "(.*?)" with "(.*?)"$/) do |element, text|
14
- trace_steps << "Invoked step: ... I fill in \"#{element}\" with \"#{text}\""
14
+ #trace_steps << "Invoked step: ... I fill in \"#{element}\" with \"#{text}\""
15
15
  end
16
16
 
17
17
 
18
18
  Then(/^I expect the following step trace:$/) do |step_text|
19
- trace_steps.should == step_text.split(/\r?\n|\n/)
19
+ #trace_steps.should == step_text.split(/\r?\n|\n/)
20
+ substeps_trace.chomp.should == step_text
20
21
  end
21
22
 
22
23
 
data/lib/macro_steps.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # File: macro_steps.rb
2
- # Purpose: step definitions that help to build macro-steps
2
+ # Purpose: step definitions that help to build macro-steps
3
3
  # (i.e. a Cucumber step that is equivalent to a sequence of sub-steps)
4
4
 
5
5
  require_relative './macros4cuke/macro-collection'
@@ -17,7 +17,7 @@ require_relative './macros4cuke/formatter/to-gherkin'
17
17
  # And I fill in "Password" with "unguessable"
18
18
  # And I click "Submit"
19
19
  # """
20
- # The regexp has two capturing group: one for the phrase,
20
+ # The regexp has two capturing group: one for the phrase,
21
21
  # a second for the terminating colon (:)
22
22
  # The regular expression uses the /x option in order to split it in pieces
23
23
  Given(/^I\sdefine\sthe\sstep\s" # Fixed part of defining step
@@ -39,7 +39,7 @@ end
39
39
 
40
40
 
41
41
  # This step is used to invoke a macro-step with a data table argument.
42
- # Notice the presence of an ending colon character ':'
42
+ # Notice the presence of an ending colon character ':'
43
43
  # after the closing bracket ']'
44
44
  # Example:
45
45
  # When I [enter my credentials as]:
@@ -52,7 +52,7 @@ When(/^I \[([^\]]+)\]:$/) do |macro_phrase, table_argument|
52
52
  end
53
53
 
54
54
  # This will call the macro with the given phrase.
55
- # The second argument consists of an array
55
+ # The second argument consists of an array
56
56
  # with couples of the kind: [argument name, actual value]
57
57
  invoke_macro(macro_phrase, table_argument.raw)
58
58
  end
@@ -60,13 +60,13 @@ end
60
60
 
61
61
  # This step will list all the encountered macro-step definitions
62
62
  # and will collect them in a single feature file.
63
- # the file is saved in the current working directory
63
+ # the file is saved in the current working directory
64
64
  # when Cucumber is closing down.
65
65
  When(/I want to list all the macros in the file "([^"]+)"$/) do |filepath|
66
66
  at_exit do
67
67
  output = File.open(filepath, 'w')
68
68
  formatter = Macros4Cuke::Formatter::ToGherkin.new(output)
69
-
69
+
70
70
  service = Macros4Cuke::FormattingService.new
71
71
  service.register(formatter)
72
72
  service.start!(Macros4Cuke::MacroCollection.instance)
@@ -21,7 +21,7 @@ class CollWalkerFactory
21
21
  backlog = collection.macro_steps.values
22
22
 
23
23
  visitor = Enumerator.new do
24
- |result_receiver| # 'result_receiver' is a Yielder
24
+ |result_receiver| # 'result_receiver' is a Yielder
25
25
  loop do
26
26
  case current_node
27
27
  when MacroCollection
@@ -81,36 +81,36 @@ class CollWalkerFactory
81
81
  theBacklog.unshift(elem)
82
82
  end
83
83
  end
84
-
84
+
85
85
  # Generate an on_step event
86
- def emit_on_step(current_node, nesting_level, backlog)
86
+ def emit_on_step(current_node, nesting_level, backlog)
87
87
  backlog.unshift(StringNode.new(:on_step_end, nil))
88
88
  backlog.unshift(current_node.renderer)
89
89
  # Does the step use a table argument?
90
90
  use_table = current_node.key =~ /_T$/ ? true : false
91
91
  backlog.unshift(StringNode.new(:on_phrase, current_node.phrase, use_table))
92
-
92
+
93
93
  return [:on_step, nesting_level, current_node]
94
94
  end
95
-
95
+
96
96
  # Generate an on_renderer event
97
97
  def emit_on_renderer(current_node, nesting_level, backlog)
98
98
  backlog.unshift(StringNode.new(:on_renderer_end, nil))
99
99
  add_children(current_node.representation, backlog)
100
100
  backlog.unshift(StringNode.new(:on_source, current_node.source))
101
-
102
- return [:on_renderer, nesting_level, current_node]
101
+
102
+ return [:on_renderer, nesting_level, current_node]
103
103
  end
104
-
105
-
104
+
105
+
106
106
  # Generate an on_section event
107
107
  def emit_on_section(current_node, nesting_level, backlog)
108
108
  backlog.unshift(StringNode.new(:on_section_end, nil))
109
109
  add_children(current_node.children, backlog)
110
-
111
- return [:on_section, nesting_level, current_node.name]
110
+
111
+ return [:on_section, nesting_level, current_node.name]
112
112
  end
113
-
113
+
114
114
 
115
115
 
116
116
 
@@ -3,7 +3,7 @@
3
3
 
4
4
  module Macros4Cuke # Module used as a namespace
5
5
  # The version number of the gem.
6
- Version = '0.4.08'
6
+ Version = '0.4.09'
7
7
 
8
8
  # Brief description of the gem.
9
9
  Description = 'Macro-steps for Cucumber'
@@ -11,14 +11,14 @@ module Macros4Cuke # Module used as a namespace
11
11
  # Constant Macros4Cuke::RootDir contains the absolute path of Macro4Cuke's
12
12
  # root directory. Note: it also ends with a slash character.
13
13
  unless defined?(RootDir)
14
- # The initialisation of constant RootDir is guarded in order
14
+ # The initialisation of constant RootDir is guarded in order
15
15
  # to avoid multiple initialisation (not allowed for constants)
16
16
 
17
17
  # The root folder of Macros4Cuke.
18
18
  RootDir = begin
19
- require 'pathname' # Load Pathname class from standard library
19
+ require 'pathname' # Load Pathname class from standard library
20
20
  rootdir = Pathname(__FILE__).dirname.parent.parent.expand_path
21
- rootdir.to_s + '/' # Append trailing slash character to it
21
+ rootdir.to_s + '/' # Append trailing slash character to it
22
22
  end
23
23
  end
24
24
  end # module
@@ -7,19 +7,19 @@ module Formatter
7
7
 
8
8
  # The list of all formatting notifications
9
9
  AllNotifications = [
10
- :on_collection,
11
- :on_collection_end,
12
- :on_step,
10
+ :on_collection,
11
+ :on_collection_end,
12
+ :on_step,
13
13
  :on_step_end,
14
- :on_phrase,
15
- :on_renderer,
14
+ :on_phrase,
15
+ :on_renderer,
16
16
  :on_renderer_end,
17
- :on_source,
17
+ :on_source,
18
18
  :on_static_text,
19
- :on_eol,
19
+ :on_eol,
20
20
  :on_comment,
21
21
  :on_placeholder,
22
- :on_section,
22
+ :on_section,
23
23
  :on_section_end
24
24
  ]
25
25
 
@@ -51,12 +51,12 @@ class ToGherkin
51
51
  def on_phrase(aLevel, aPhraseText, useTable)
52
52
  suffix = useTable ? ':' : ''
53
53
  io.print "#{indentation(aLevel)}Given I define the step "
54
- io.puts %Q|"* I [#{aPhraseText}]#{suffix}" to mean:|
54
+ io.puts %Q("* I [#{aPhraseText}]#{suffix}" to mean:)
55
55
  end
56
56
 
57
57
  def on_source(aLevel, aSourceText)
58
58
  ljust = indentation(aLevel)
59
- triple_quotes = %Q|#{ljust}"""|
59
+ triple_quotes = %Q(#{ljust}""")
60
60
  io.puts triple_quotes
61
61
 
62
62
  # Indent source text
@@ -20,11 +20,11 @@ class ToNull
20
20
  def implements()
21
21
  return Formatter::AllNotifications
22
22
  end
23
-
23
+
24
24
  def on_collection(aLevel, aMacroCollection)
25
25
  ; # Do nothing
26
26
  end
27
-
27
+
28
28
  def on_collection_end(aLevel)
29
29
  ; # Do nothing
30
30
  end
@@ -32,7 +32,7 @@ class ToNull
32
32
  def on_step(aLevel, aMacroStep)
33
33
  ; # Do nothing
34
34
  end
35
-
35
+
36
36
  def on_step_end(aLevel)
37
37
  ; # Do nothing
38
38
  end
@@ -44,7 +44,7 @@ class ToNull
44
44
  def on_renderer(aLevel, aRenderer)
45
45
  ; # Do nothing
46
46
  end
47
-
47
+
48
48
  def on_renderer_end(aLevel)
49
49
  ; # Do nothing
50
50
  end
@@ -52,27 +52,27 @@ class ToNull
52
52
  def on_source(aLevel, aSourceText)
53
53
  ; # Do nothing
54
54
  end
55
-
55
+
56
56
  def on_static_text(aLevel, aText)
57
57
  ; # Do nothing
58
58
  end
59
-
59
+
60
60
  def on_comment(aLevel, aComment)
61
61
  ; # Do nothing
62
62
  end
63
-
63
+
64
64
  def on_eol(aLevel)
65
65
  ; # Do nothing
66
66
  end
67
-
67
+
68
68
  def on_placeholder(aLevel, aPlaceHolderName)
69
69
  ; # Do nothing
70
70
  end
71
-
71
+
72
72
  def on_section(aLevel, aSectionName)
73
73
  ; # Do Nothing
74
74
  end
75
-
75
+
76
76
  def on_section_end(aLevel)
77
77
  ; # Do Nothing
78
78
  end