Skip to content

Commit 6d46462

Browse files
committed
Standardrb fixup
1 parent 78b50d4 commit 6d46462

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

lib/mime/types.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,8 +151,8 @@ def [](type_id, complete: false, registered: false)
151151
def type_for(filename)
152152
results =
153153
Array(filename).flat_map { |fn|
154-
@extension_index[fn.chomp.downcase[/\.?([^.]*?)$/, 1]]
155-
}.compact.inject(Set.new, :+)
154+
@extension_index[fn.chomp.downcase[/\.?([^.]*?)$/, 1]]
155+
}.compact.inject(Set.new, :+)
156156

157157
stable_sort(results)
158158
end

test/test_mime_types.rb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ def mime_types
3838
assert_kind_of Enumerator::Lazy, mime_types.map.lazy
3939
end
4040

41-
it 'is countable with an enumerator' do
41+
it "is countable with an enumerator" do
4242
assert_equal 8, mime_types.each.count
4343
assert_equal 8, mime_types.lazy.count
4444
end
@@ -161,13 +161,13 @@ def mime_types
161161
assert_includes mime_types.type_for("xtxt"), "text/plain"
162162
end
163163

164-
it 'returns a stable order for types with equal priority' do
165-
assert_equal %w(audio/webm video/webm), mime_types.type_for('foo.webm')
164+
it "returns a stable order for types with equal priority" do
165+
assert_equal %w[audio/webm video/webm], mime_types.type_for("foo.webm")
166166
end
167167
end
168168

169-
describe '#count' do
170-
it 'can count the number of types inside' do
169+
describe "#count" do
170+
it "can count the number of types inside" do
171171
assert_equal 8, mime_types.count
172172
end
173173
end

test/test_mime_types_class.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,8 @@ def setup
101101
assert_includes MIME::Types.type_for("xtxt"), "text/plain"
102102
end
103103

104-
it 'returns a stable order for types with equal priority' do
105-
assert_equal %w(audio/webm video/webm), MIME::Types.type_for('foo.webm')
104+
it "returns a stable order for types with equal priority" do
105+
assert_equal %w[audio/webm video/webm], MIME::Types.type_for("foo.webm")
106106
end
107107
end
108108

0 commit comments

Comments
 (0)