test/data_sources/test_filesystem.rb in nanoc3-3.2.0 vs test/data_sources/test_filesystem.rb in nanoc3-3.2.1
- old
+ new
@@ -13,28 +13,27 @@
data_source = SampleFilesystemDataSource.new(nil, nil, nil, nil)
# Remove files to make sure they are recreated
FileUtils.rm_rf('content')
FileUtils.rm_rf('layouts/default')
- FileUtils.rm_rf('lib/default.rb')
+ FileUtils.rm_rf('lib')
# Mock VCS
vcs = mock
- vcs.expects(:add).times(3) # One time for each directory
+ vcs.expects(:add).times(2) # One time for each directory
data_source.vcs = vcs
# Recreate files
data_source.setup
# Ensure essential files have been recreated
assert(File.directory?('content/'))
assert(File.directory?('layouts/'))
- assert(File.directory?('lib/'))
# Ensure no non-essential files have been recreated
assert(!File.file?('content/index.html'))
assert(!File.file?('layouts/default.html'))
- assert(!File.file?('lib/default.rb'))
+ refute(File.directory?('lib/'))
end
def test_items
# Create data source
data_source = SampleFilesystemDataSource.new(nil, nil, nil, nil)