summaryrefslogtreecommitdiff
path: root/test/test_mime_types_lazy.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/test_mime_types_lazy.rb')
-rw-r--r--test/test_mime_types_lazy.rb32
1 files changed, 16 insertions, 16 deletions
diff --git a/test/test_mime_types_lazy.rb b/test/test_mime_types_lazy.rb
index 12233c0..04f81f6 100644
--- a/test/test_mime_types_lazy.rb
+++ b/test/test_mime_types_lazy.rb
@@ -1,16 +1,16 @@
# frozen_string_literal: true
-require 'mime/types'
-require 'minitest_helper'
+require "mime/types"
+require "minitest_helper"
-describe MIME::Types, 'lazy loading' do
+describe MIME::Types, "lazy loading" do
def setup
- ENV['RUBY_MIME_TYPES_LAZY_LOAD'] = 'true'
+ ENV["RUBY_MIME_TYPES_LAZY_LOAD"] = "true"
end
def teardown
reset_mime_types
- ENV.delete('RUBY_MIME_TYPES_LAZY_LOAD')
+ ENV.delete("RUBY_MIME_TYPES_LAZY_LOAD")
end
def reset_mime_types
@@ -18,32 +18,32 @@ describe MIME::Types, 'lazy loading' do
MIME::Types.send(:load_default_mime_types)
end
- describe '.lazy_load?' do
- it 'is true when RUBY_MIME_TYPES_LAZY_LOAD is set' do
- assert_output '', /RUBY_MIME_TYPES_LAZY_LOAD/ do
+ describe ".lazy_load?" do
+ it "is true when RUBY_MIME_TYPES_LAZY_LOAD is set" do
+ assert_output "", /RUBY_MIME_TYPES_LAZY_LOAD/ do
assert_equal true, MIME::Types.send(:lazy_load?)
end
end
- it 'is nil when RUBY_MIME_TYPES_LAZY_LOAD is unset' do
- ENV['RUBY_MIME_TYPES_LAZY_LOAD'] = nil
- assert_output '', '' do
+ it "is nil when RUBY_MIME_TYPES_LAZY_LOAD is unset" do
+ ENV["RUBY_MIME_TYPES_LAZY_LOAD"] = nil
+ assert_output "", "" do
assert_nil MIME::Types.send(:lazy_load?)
end
end
- it 'is false when RUBY_MIME_TYPES_LAZY_LOAD is false' do
- ENV['RUBY_MIME_TYPES_LAZY_LOAD'] = 'false'
- assert_output '', /RUBY_MIME_TYPES_LAZY_LOAD/ do
+ it "is false when RUBY_MIME_TYPES_LAZY_LOAD is false" do
+ ENV["RUBY_MIME_TYPES_LAZY_LOAD"] = "false"
+ assert_output "", /RUBY_MIME_TYPES_LAZY_LOAD/ do
assert_equal false, MIME::Types.send(:lazy_load?)
end
end
end
- it 'loads lazily when RUBY_MIME_TYPES_LAZY_LOAD is set' do
+ it "loads lazily when RUBY_MIME_TYPES_LAZY_LOAD is set" do
MIME::Types.instance_variable_set(:@__types__, nil)
assert_nil MIME::Types.instance_variable_get(:@__types__)
- refute_nil MIME::Types['text/html'].first
+ refute_nil MIME::Types["text/html"].first
refute_nil MIME::Types.instance_variable_get(:@__types__)
end
end