From 16d1f21817517241d5b0ba89d1243257788e5b4d Mon Sep 17 00:00:00 2001 From: Geremia Taglialatela Date: Mon, 9 Dec 2024 09:12:25 +0100 Subject: [PATCH] Fix unused variables warnings Fix the following warnings: ``` spec/cached_asset_file_spec.rb:51: warning: assigned but unused variable - known_document_0 spec/transformation_pipeline/transformations/transformation_spec.rb:19: warning: assigned but unused variable - svg ``` --- spec/cached_asset_file_spec.rb | 1 - .../transformations/transformation_spec.rb | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/spec/cached_asset_file_spec.rb b/spec/cached_asset_file_spec.rb index 29c0284..e3c14d9 100644 --- a/spec/cached_asset_file_spec.rb +++ b/spec/cached_asset_file_spec.rb @@ -48,7 +48,6 @@ end it "filters wanted files by simple string matching" do - known_document_0 = File.read(fixture_path.join("assets0", "known-document.svg")) known_document_1 = File.read(fixture_path.join("assets1", "known-document.svg")) asset_loader = InlineSvg::CachedAssetFile.new(paths: fixture_path, filters: "assets1") diff --git a/spec/transformation_pipeline/transformations/transformation_spec.rb b/spec/transformation_pipeline/transformations/transformation_spec.rb index 2a6b847..8c98cba 100644 --- a/spec/transformation_pipeline/transformations/transformation_spec.rb +++ b/spec/transformation_pipeline/transformations/transformation_spec.rb @@ -25,7 +25,7 @@ returned_document = transformation.with_svg(document, &b) end.to yield_control - expect(returned_document.to_s).to match(%r{Some document}) + expect(returned_document.to_s).to match(svg) end it "does not yield if the document does not contain an SVG element at the root" do