test/unit/dassets_tests.rb in dassets-0.14.3 vs test/unit/dassets_tests.rb in dassets-0.14.4
- old
+ new
@@ -9,11 +9,11 @@
class UnitTests < Assert::Context
desc "Dassets"
subject{ Dassets }
should have_imeths :config, :configure, :init, :reset
- should have_imeths :[], :source_files
+ should have_imeths :[], :source_files, :combinations
should "return a `Config` instance with the `config` method" do
assert_kind_of Config, subject.config
end
@@ -43,17 +43,23 @@
file2 = subject['nested/file3.txt']
assert_same file2, file1
end
- should "return an asset file that doesn't exist if digest path not found" do
- file = subject['path/not/found.txt']
- assert_not file.exists?
+ should "complain if digest path is not found using the index operator" do
+ assert_raises AssetFileError do
+ subject['path/not/found.txt']
+ end
end
should "know its list of configured source files" do
exp = Dassets::SourceFiles.new(subject.config.sources)
assert_equal exp, subject.source_files
+ end
+
+ should "know its configured combinations" do
+ exp = subject.config.combinations
+ assert_equal exp, subject.combinations
end
end
end