Skip to content

Commit

Permalink
Merge pull request #69 from wonda-tea-coffee/suppress-warning-unused-…
Browse files Browse the repository at this point in the history
…variable

Suppress warning
  • Loading branch information
gmcgibbon authored Apr 19, 2022
2 parents 7f71ab9 + f2d9531 commit 7dc54ca
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 0 additions & 1 deletion test/mime_type_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ def setup
end

test "closes Pathname files after use" do
content_type = Marcel::MimeType.for Pathname.new(@path)
open_files = ObjectSpace.each_object(File).reject(&:closed?)
assert open_files.none? { |f| f.path == @path }
end
Expand Down
2 changes: 1 addition & 1 deletion test/test_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def each_content_type_fixture(folder)
FileUtils.chdir fixture_path(folder) do
Dir["**/*.*"].map do |name|
if File.file?(name)
_, content_type, extra, extension = *name.match(/\A([^\/]+\/[^\/]*)\/?(.*)\.(\w+)\Z/)
_, content_type, extra, _ = *name.match(/\A([^\/]+\/[^\/]*)\/?(.*)\.(\w+)\Z/)
extra = nil if content_type[-content_type.size..-1] == extra
yield files("#{folder}/#{name}"), name, content_type
end
Expand Down

0 comments on commit 7dc54ca

Please sign in to comment.