Module: EacGit::Rspec::StubbedGitLocalRepo

Defined in:
lib/eac_git/rspec/stubbed_git_local_repo.rb

Defined Under Namespace

Classes: StubbedGitRepository, StubbedGitRepositoryFile

Instance Method Summary collapse

Instance Method Details

#stubbed_git_local_repo(bare = false) ⇒ Object



12
13
14
15
16
17
18
19
# File 'lib/eac_git/rspec/stubbed_git_local_repo.rb', line 12

def stubbed_git_local_repo(bare = false)
  path = ::Dir.mktmpdir
  ::EacRubyUtils::Envs.local.command(stubbed_git_local_repo_args(path, bare)).execute!
  repo = StubbedGitRepository.new(path)
  repo.command('config', 'user.email', '[email protected]').execute!
  repo.command('config', 'user.name', 'The User').execute!
  repo
end