Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Require pathname module #536

Merged
merged 1 commit into from Dec 17, 2021
Merged

Conversation

dleidert
Copy link
Contributor

@dleidert dleidert commented Sep 10, 2021

... otherwise the test fails with:

TestWorktree:
  test_worktree_add_and_remove:				.: (0.080734)
  test_worktree_prune:					.: (0.055268)
  test_worktrees_all:					.: (0.037409)
  test_worktrees_single:				E
===============================================================================
Error: test_worktrees_single(TestWorktree): NameError: uninitialized constant TestWorktree::Pathname
/<<PKGBUILDDIR>>/tests/units/test_worktree.rb:51:in `test_worktrees_single'
     48:
     49:   def test_worktrees_single
     50:     worktree = @git.worktrees.first
  => 51:     git_dir = Pathname.new(@git.dir.to_s).realpath.to_s
     52:     assert_equal(worktree.dir, git_dir)
     53:     assert_equal(worktree.gcommit, SAMPLE_LAST_COMMIT)
     54:   end
===============================================================================
: (0.041215)

Requiring pathname fixes the issue.

closes #535

Signed-off-by: Daniel Leidert daniel.leidert@wgdd.de

... otherwise the test fails with:

TestWorktree:
  test_worktree_add_and_remove:				.: (0.080734)
  test_worktree_prune:					.: (0.055268)
  test_worktrees_all:					.: (0.037409)
  test_worktrees_single:				E
===============================================================================
Error: test_worktrees_single(TestWorktree): NameError: uninitialized constant TestWorktree::Pathname
/<<PKGBUILDDIR>>/tests/units/test_worktree.rb:51:in `test_worktrees_single'
     48:
     49:   def test_worktrees_single
     50:     worktree = @git.worktrees.first
  => 51:     git_dir = Pathname.new(@git.dir.to_s).realpath.to_s
     52:     assert_equal(worktree.dir, git_dir)
     53:     assert_equal(worktree.gcommit, SAMPLE_LAST_COMMIT)
     54:   end
===============================================================================
: (0.041215)

Signed-off-by: Daniel Leidert <daniel.leidert@wgdd.de>
Copy link
Member

@jcouball jcouball left a comment

Thank you. Good find.

@jcouball jcouball merged commit 1023f85 into ruby-git:master Dec 17, 2021
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants