test/extra/test_filesystem_tools.rb in nanoc-3.7.3 vs test/extra/test_filesystem_tools.rb in nanoc-3.7.4
- old
+ new
@@ -1,11 +1,11 @@
# encoding: utf-8
class Nanoc::Extra::FilesystemToolsTest < Nanoc::TestCase
def setup
super
- skip_unless_have_symlink
+ skip_unless_symlinks_supported
end
def test_all_files_in_follows_symlinks_to_dirs
# Write sample files
(0..15).each do |i|
@@ -58,11 +58,11 @@
File.open('foo/x.md', 'w') { |io| io.write('o hai from foo/x') }
File.open('bar/y.md', 'w') { |io| io.write('o hai from bar/y') }
File.symlink('../bar', 'foo/barlink')
- expected_files = [ 'foo/barlink/y.md', 'foo/x.md' ]
+ expected_files = ['foo/barlink/y.md', 'foo/x.md']
actual_files = Nanoc::Extra::FilesystemTools.all_files_in('foo').sort
assert_equal expected_files, actual_files
end
def test_all_files_in_follows_symlinks_to_files
@@ -71,10 +71,10 @@
FileUtils.mkdir_p('dir')
File.open('dir/foo', 'w') { |io| io.write('o hai from foo') }
File.symlink('../bar', 'dir/bar-link')
# Check
- expected_files = [ 'dir/bar-link', 'dir/foo' ]
+ expected_files = ['dir/bar-link', 'dir/foo']
actual_files = Nanoc::Extra::FilesystemTools.all_files_in('dir').sort
assert_equal expected_files, actual_files
end
def test_resolve_symlink