lib/spoom/test_helpers/project.rb in spoom-1.1.1 vs lib/spoom/test_helpers/project.rb in spoom-1.1.2

- old
+ new

@@ -98,9 +98,19 @@ sig { void } def destroy FileUtils.rm_rf(path) end + sig { params(name: String).void } + def create_and_checkout_branch(name) + Spoom::Git.exec("git checkout -b #{name}", path: path) + end + + sig { returns(T.nilable(String)) } + def current_branch + Spoom::Git.current_branch(path: path) + end + private # Create an absolute path from `self.path` and `rel_path` sig { params(rel_path: String).returns(String) } def absolute_path(rel_path)