test/test_sources.rb in pdd-0.17.8 vs test/test_sources.rb in pdd-0.17.9
- old
+ new
@@ -25,11 +25,11 @@
require 'tmpdir'
require_relative '../test/test__helper'
require_relative '../lib/pdd/sources'
# Sources test.
-# Author:: Yegor Bugayenko (yegor@teamed.io)
+# Author:: Yegor Bugayenko (yegor256@gmail.com)
# Copyright:: Copyright (c) 2014-2017 Yegor Bugayenko
# License:: MIT
class TestSources < Minitest::Test
def test_iterator
in_temp(['a.txt', 'b/c.txt']) do |dir|
@@ -37,10 +37,11 @@
assert_equal 2, list.size
end
end
def test_ignores_binary_files
+ skip if Gem.win_platform?
in_temp([]) do |dir|
[
'README.md',
'.git/index',
'test_assets/elegant-objects.png',
@@ -59,10 +60,13 @@
exts = %w[(xsl java rb cpp apt)]
exts.each do |ext|
File.write(File.join(dir, "test.#{ext}"), 'text')
end
list = PDD::Sources.new(dir).fetch
- assert_equal exts.size, list.size
+ assert_equal(
+ exts.size, list.size,
+ "Files found: #{list}"
+ )
end
end
def test_detects_xml_file
in_temp(['a.xml']) do |dir|