Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

test: runner restores current dir

PDoc::Generators::Html::Website#render is using Dir.chdir
to change to the :output dir and not restoring the current
working dir.

This new test fails.
  • Loading branch information...
commit 2e16b91a3859aa0d795c5aa24bc4b5e836bd18dc 1 parent ad5113b
@stepheneb stepheneb authored committed
Showing with 15 additions and 0 deletions.
  1. +1 −0  .gitignore
  2. +14 −0 test/unit/runner/basic_test.rb
View
1  .gitignore
@@ -1,2 +1,3 @@
.DS_Store
*.gem
+output
View
14 test/unit/runner/basic_test.rb
@@ -0,0 +1,14 @@
+require File.expand_path(File.join(File.dirname(__FILE__), "..", "parser_test_helper"))
+
+class BasicTest < Test::Unit::TestCase
+
+ def test_restores_original_dir
+ original_dir = Dir.pwd
+ puts "*** #{original_dir}"
+ PDoc::Runner.new("test/fixtures/ajax.js",
+ :output => 'test/output',
+ :templates => 'templates/html'
+ ).run
+ assert_equal original_dir, Dir.pwd
+ end
+end
Please sign in to comment.
Something went wrong with that request. Please try again.