diff options
| author | Dan Allen <dan.j.allen@gmail.com> | 2021-05-27 01:03:29 -0600 |
|---|---|---|
| committer | Dan Allen <dan.j.allen@gmail.com> | 2021-05-27 01:03:29 -0600 |
| commit | da82a13ce3a087db50c885730f7c37f2e176aad3 (patch) | |
| tree | b05b532dec67934b6873bfee015d7e989bf3421a | |
| parent | 35b7c8b1625ebe5d86ba29c0a0e0d90f5e6dc6ef (diff) | |
fix ambiguous argument type in step definitions in test suite
| -rw-r--r-- | features/step_definitions.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/features/step_definitions.rb b/features/step_definitions.rb index bd12a30c..68aa2f82 100644 --- a/features/step_definitions.rb +++ b/features/step_definitions.rb @@ -12,24 +12,24 @@ require 'rspec/expectations' require 'tilt' require 'slim' -Given /the AsciiDoc source/ do |source| +Given %r/the AsciiDoc source/ do |source| @source = source end -When /it is converted to html/ do +When %r/it is converted to html/ do @output = Asciidoctor.convert @source end -When /it is converted to docbook/ do +When %r/it is converted to docbook/ do @output = Asciidoctor.convert @source, backend: :docbook end -Then /the result should (match|contain) the (HTML|XML) source/ do |matcher, format, expected| +Then %r/the result should (match|contain) the (HTML|XML) source/ do |matcher, _, expected| match_expectation = matcher == 'match' ? (eq expected) : (include expected) (expect @output).to match_expectation end -Then /the result should (match|contain) the (HTML|XML) structure/ do |matcher, format, expected| +Then %r/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 } |
