diff options
| author | Dan Allen <dan.j.allen@gmail.com> | 2019-01-04 20:09:24 -0700 |
|---|---|---|
| committer | Dan Allen <dan.j.allen@gmail.com> | 2019-01-06 16:42:53 -0700 |
| commit | f75a423bb7077d91177657267ef2a5a422429823 (patch) | |
| tree | bc318e9c5499a326c0925acadaa54236fa1db8ce /features | |
| parent | 83619ac4e1b8207614c1500a0012d30af28db68b (diff) | |
switch to modern hash syntax
- switch to modern hash syntax (from :key => value to key: value)
- put space inside hash brackets (from {key: value} to { key: value }
- use dangling comma on last entry of multi-line hash
Diffstat (limited to 'features')
| -rw-r--r-- | features/step_definitions.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/features/step_definitions.rb b/features/step_definitions.rb index ae1dc5b6..9c740887 100644 --- a/features/step_definitions.rb +++ b/features/step_definitions.rb @@ -22,7 +22,7 @@ When /it is converted to html/ do end When /it is converted to docbook/ do - @output = Asciidoctor.convert @source, :backend => :docbook + @output = Asciidoctor.convert @source, backend: :docbook end Then /the result should (match|contain) the (HTML|XML) source/ do |matcher, format, expected| @@ -33,9 +33,9 @@ end Then /the result should (match|contain) the (HTML|XML) structure/ do |matcher, format, expected| result = @output if format == 'HTML' - options = { :format => :html, :disable_escape => true, :sort_attrs => false } + options = { format: :html, disable_escape: true, sort_attrs: false } else # format == 'XML' - options = { :format => :xhtml, :disable_escape => true, :sort_attrs => false } + options = { format: :xhtml, disable_escape: true, sort_attrs: false } result = result.gsub '"/>', '" />' if result.include? '"/>' end result = Slim::Template.new(options) { result.each_line.map {|l| (l.start_with? '<') ? l : %(|#{l}) }.join }.render |
