diff options
| author | Dan Allen <dan.j.allen@gmail.com> | 2022-05-06 23:54:31 -0600 |
|---|---|---|
| committer | Dan Allen <dan.j.allen@gmail.com> | 2022-05-07 04:56:27 -0600 |
| commit | fed4609d026833630cf37f327db4edb7e9047cc5 (patch) | |
| tree | f38ba18e653e3502eace8746ea9050d7e5f47430 /spec/spec_helper.rb | |
| parent | 83249580e94222a76328e10cf879bda559d27f86 (diff) | |
don't mutate pdf_theme in spec helper
Diffstat (limited to 'spec/spec_helper.rb')
| -rw-r--r-- | spec/spec_helper.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 205b8efb..739be582 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -416,7 +416,8 @@ RSpec.configure do |config| end opts = opts.merge backend: 'pdf' unless opts.key? :backend if Hash === (pdf_theme = opts[:pdf_theme]) - opts[:pdf_theme] = build_pdf_theme pdf_theme, (pdf_theme.delete :extends) + pdf_theme_extends = (pdf_theme = pdf_theme.dup).delete :extends if pdf_theme.key? :extends + opts[:pdf_theme] = build_pdf_theme pdf_theme, pdf_theme_extends end if Pathname === input opts[:to_dir] = output_dir unless opts.key? :to_dir @@ -441,7 +442,8 @@ RSpec.configure do |config| (opts[:attributes] ||= {}).update attribute_overrides end if Hash === (pdf_theme = opts[:pdf_theme]) - opts[:pdf_theme] = build_pdf_theme pdf_theme, (pdf_theme.delete :extends) + pdf_theme_extends = (pdf_theme = pdf_theme.dup).delete :extends if pdf_theme.key? :extends + opts[:pdf_theme] = build_pdf_theme pdf_theme, pdf_theme_extends end if Pathname === input Asciidoctor.convert_file input, (opts.merge backend: 'pdf', safe: :safe) |
