Skip to content

Commit

Permalink
Fix specs: replace my wrong custom code with a correct way to get the…
Browse files Browse the repository at this point in the history
… path one level up from the current
  • Loading branch information
anmarchenko committed Nov 27, 2024
1 parent b4ad469 commit 3cf16b1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions spec/datadog/ci/test_optimisation/coverage/event_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,8 @@
Datadog::CI::Git::LocalRepository.remove_instance_variable(:@prefix_to_root)
end

new_root = Dir.pwd.gsub("/#{current_folder}", "")
new_root = "/" if new_root.empty?
# new_root is one level up from the current folder
new_root = File.dirname(Dir.pwd)
allow(Datadog::CI::Git::LocalRepository).to receive(:root).and_return(new_root)
end

Expand Down

0 comments on commit 3cf16b1

Please sign in to comment.