test/unit/source_file_tests.rb in dassets-0.15.1 vs test/unit/source_file_tests.rb in dassets-0.15.2

- old
+ new

@@ -16,11 +16,12 @@ @file_path = TEST_SUPPORT_PATH.join("app/assets/file1.txt").to_s end should have_readers :file_path should have_imeths :source, :asset_file, :digest_path - should have_imeths :compiled, :exists?, :mtime, :response_headers + should have_imeths :compiled, :exists?, :mtime + should have_imeths :base_path, :response_headers should have_cmeth :find_by_digest_path should "know its file path" do assert_that(subject.file_path).equals(@file_path.to_s) end @@ -55,9 +56,13 @@ assert_that(subject.mtime).equals(File.mtime(subject.file_path)) end should "use the response headers of its source as its response headers" do assert_that(subject.response_headers).is(subject.source.response_headers) + end + + should "use the base path of its source as its base path" do + assert_that(subject.base_path).equals(subject.source.base_path.to_s) end should "be findable by its digest path" do found = Dassets::SourceFile.find_by_digest_path(subject.digest_path)