test/test_pdd.rb in pdd-0.2.3 vs test/test_pdd.rb in pdd-0.3
- old
+ new
@@ -32,12 +32,13 @@
# Copyright:: Copyright (c) 2014 Yegor Bugayenko
# License:: MIT
class TestPDD < Minitest::Test
def test_basic
Dir.mktmpdir 'test' do |dir|
- opts = Slop.parse ['-v', '-s', dir] do
+ opts = Slop.parse ['-v', '-s', dir, '-e', '**/*.png'] do
on 'v', 'verbose'
on 's', 'source', argument: :required
+ on 'e', 'exclude', as: Array, argument: :required
end
File.write(File.join(dir, 'a.txt'), '@todo #55 hello!')
xml = Nokogiri::XML::Document.parse(PDD::Base.new(opts).xml)
assert_equal 1, xml.xpath('/puzzles/puzzle[file="a.txt"]').size
end