diff --git a/test/test_epubmaker.rb b/test/test_epubmaker.rb index c4538247..3166cdc6 100644 --- a/test/test_epubmaker.rb +++ b/test/test_epubmaker.rb @@ -882,10 +882,11 @@ def error(s) Dir.mkdir(File.join(tmpdir, 'subdir')) File.write(File.join(tmpdir, 'subdir', 'exist.html'), '') + Dir.mkdir(File.join(tmpdir, 'test')) + File.write(File.join(tmpdir, 'test', 'ch01.html'), '') + File.write(File.join(tmpdir, 'test', 'style.css'), 'div { background-image: url("images/bg.jpg")}') + Dir.chdir(tmpdir) do - Dir.mkdir('test') - File.write(File.join(tmpdir, 'test', 'ch01.html'), '') - File.write(File.join(tmpdir, 'test', 'style.css'), 'div { background-image: url("images/bg.jpg")}') yield(epubmaker, File.join(tmpdir, 'test')) end end