Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions lib/spoom/test_helpers/project.rb
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,9 @@ def files
# Actions

# Run `git init` in this project
sig { void }
def git_init
Spoom::Git.exec("git init -q", path: path)
sig { params(branch: String).void }
def git_init(branch: "main")
Spoom::Git.exec("git init -q -b #{branch}", path: path)
Spoom::Git.exec("git config user.name 'spoom-tests'", path: path)
Spoom::Git.exec("git config user.email 'spoom@shopify.com'", path: path)
end
Expand Down
2 changes: 1 addition & 1 deletion test/spoom/cli/coverage_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -421,7 +421,7 @@ def test_report_generate_html_file

def test_finish_on_original_branch
create_git_history
assert_equal("master", @project.current_branch)
assert_equal("main", @project.current_branch)
@project.create_and_checkout_branch("fake-branch")
assert_equal("fake-branch", @project.current_branch)
@project.bundle_exec("spoom coverage timeline --save")
Expand Down
2 changes: 1 addition & 1 deletion test/spoom/git_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ def test_git_log
def test_git_rev_parse
@project.write("file")
@project.commit
assert_match(/^[a-f0-9]+$/, Spoom::Git.rev_parse("master", path: @project.path).first.strip)
assert_match(/^[a-f0-9]+$/, Spoom::Git.rev_parse("main", path: @project.path).first.strip)
end

def test_git_show
Expand Down