test/unit/config_tests.rb in dassets-0.15.0 vs test/unit/config_tests.rb in dassets-0.15.1
- old
+ new
@@ -1,15 +1,17 @@
+# frozen_string_literal: true
+
require "assert"
require "dassets/config"
require "dassets/cache"
require "dassets/file_store"
class Dassets::Config
class UnitTests < Assert::Context
desc "Dassets::Config"
- subject { @config }
+ subject{ @config }
setup do
@config = Dassets::Config.new
end
@@ -99,19 +101,20 @@
assert_that(subject.fingerprint_cache).equals(cache)
end
should "register new sources with the `source` method" do
path = Factory.path
- filter = proc{ |paths| [] }
+ filter = proc{ |_paths| [] }
subject.source(path){ |s| s.filter(&filter) }
assert_that(subject.sources.size).equals(1)
assert_that(subject.sources.first).is_kind_of(Dassets::Source)
assert_that(subject.sources.first.path).equals(path)
assert_that(subject.sources.first.filter).equals(filter)
end
- should "know its combinations and return the keyed digest path by default" do
+ should "know its combinations and return the keyed digest path by "\
+ "default" do
assert_that(subject.combinations).is_kind_of(::Hash)
assert_that(subject.combinations["some/digest.path"])
.equals(["some/digest.path"])
end