diff --git a/testing/resources/ruby_1_9_3_hooks_repo/lib/.gitignore b/testing/resources/ruby_1_9_3_hooks_repo/lib/.gitignore new file mode 100644 index 00000000..e69de29b diff --git a/testing/resources/ruby_hooks_repo/lib/.gitignore b/testing/resources/ruby_hooks_repo/lib/.gitignore new file mode 100644 index 00000000..e69de29b diff --git a/tests/commands/install_uninstall_test.py b/tests/commands/install_uninstall_test.py index ae9dddfb..09779350 100644 --- a/tests/commands/install_uninstall_test.py +++ b/tests/commands/install_uninstall_test.py @@ -139,7 +139,8 @@ def test_environment_not_sourced(tmpdir_factory): ret, stdout, stderr = local['git'].run( ['commit', '--allow-empty', '-m', 'foo'], - env={}, + # XXX: 'HOME' makes this test pass on OSX + env={'HOME': os.environ['HOME']}, retcode=None, ) assert ret == 1 diff --git a/tests/repository_test.py b/tests/repository_test.py index 55950641..451054d9 100644 --- a/tests/repository_test.py +++ b/tests/repository_test.py @@ -55,7 +55,7 @@ def test_versioned_python_hook(tmpdir_factory, store): def test_run_a_node_hook(tmpdir_factory, store): _test_hook_repo( tmpdir_factory, store, 'node_hooks_repo', - 'foo', [], 'Hello World\n', + 'foo', ['/dev/null'], 'Hello World\n', ) @@ -73,7 +73,7 @@ def test_run_versioned_node_hook(tmpdir_factory, store): def test_run_a_ruby_hook(tmpdir_factory, store): _test_hook_repo( tmpdir_factory, store, 'ruby_hooks_repo', - 'ruby_hook', [], 'Hello world from a ruby hook\n', + 'ruby_hook', ['/dev/null'], 'Hello world from a ruby hook\n', ) @@ -82,7 +82,9 @@ def test_run_a_ruby_hook(tmpdir_factory, store): def test_run_versioned_ruby_hook(tmpdir_factory, store): _test_hook_repo( tmpdir_factory, store, 'ruby_1_9_3_hooks_repo', - 'ruby_hook', [], '1.9.3\n484\nHello world from a ruby hook\n', + 'ruby_hook', + ['/dev/null'], + '1.9.3\n484\nHello world from a ruby hook\n', ) @@ -90,7 +92,7 @@ def test_run_versioned_ruby_hook(tmpdir_factory, store): def test_system_hook_with_spaces(tmpdir_factory, store): _test_hook_repo( tmpdir_factory, store, 'system_hook_with_spaces_repo', - 'system-hook-with-spaces', [], 'Hello World\n', + 'system-hook-with-spaces', ['/dev/null'], 'Hello World\n', ) @@ -180,7 +182,7 @@ def test_cwd_of_hook(tmpdir_factory, store): with local.cwd(path): _test_hook_repo( tmpdir_factory, store, 'prints_cwd_repo', - 'prints_cwd', [], path + '\n', + 'prints_cwd', ['-L'], path + '\n', ) @@ -284,7 +286,7 @@ def test_tags_on_repositories(in_tmpdir, tmpdir_factory, store): repo_1 = Repository.create( make_config_from_repo(git_dir_1, sha=tag), store, ) - ret = repo_1.run_hook('prints_cwd', []) + ret = repo_1.run_hook('prints_cwd', ['-L']) assert ret[0] == 0 assert ret[1].strip() == in_tmpdir