[neon/neon/settings/Neon/unstable] test: don't leave pwd mangled after test
Harald Sitter
null at kde.org
Wed Aug 18 12:21:47 BST 2021
Git commit a262c95fb751a6adca2b80942b846eed8198199d by Harald Sitter.
Committed on 18/08/2021 at 11:13.
Pushed by sitter into branch 'Neon/unstable'.
don't leave pwd mangled after test
it'd break other tests every other time
M +2 -0 test/neon-migrate-unstable-groups_test.rb
https://invent.kde.org/neon/neon/settings/commit/a262c95fb751a6adca2b80942b846eed8198199d
diff --git a/test/neon-migrate-unstable-groups_test.rb b/test/neon-migrate-unstable-groups_test.rb
index 0f88ac1..983daee 100644
--- a/test/neon-migrate-unstable-groups_test.rb
+++ b/test/neon-migrate-unstable-groups_test.rb
@@ -8,6 +8,7 @@ class NeonMigrateUnstableGroups < Minitest::Test
def setup
@datadir = File.realpath("#{__dir__}/data/neon-migrate-unstable-groups/")
@tmpdir = Dir.mktmpdir
+ @workdir = Dir.pwd
Dir.chdir(@tmpdir)
FileUtils.cp_r("#{@datadir}/.", '.')
ENV['ROOT'] = @tmpdir
@@ -16,6 +17,7 @@ class NeonMigrateUnstableGroups < Minitest::Test
def teardown
FileUtils.rm_r(@tmpdir)
ENV.delete('ROOT')
+ Dir.chdir(@workdir)
end
def test_run
More information about the Neon-commits
mailing list