Sha256: c93454b0fd789745cb88d8feceb3ec1c68534bb7002705b401dff59bd3194b5e

Contents?: true

Size: 453 Bytes

Versions: 5

Compression:

Stored size: 453 Bytes

Contents

require "fileutils"
require "singleton"

class DummyRepo
  include Singleton

  def path
    File.join(%w(spec fixtures dummy_repo))
  end

  def act_as_real
    FileUtils.mv(fake_git_config_path, real_git_config_path)
  end

  def act_as_fake
    FileUtils.mv(real_git_config_path, fake_git_config_path)
  end

  private

  def fake_git_config_path
    File.join(path, "dot_git")
  end

  def real_git_config_path
    File.join(path, ".git")
  end
end

Version data entries

5 entries across 5 versions & 2 rubygems

Version Path
last_commit-0.1.0 spec/support/dummy_repo.rb
developer_info-0.0.2 spec/support/dummy_repo.rb
last_commit-0.0.2 spec/support/dummy_repo.rb
last_commit-0.0.1 spec/support/dummy_repo.rb
developer_info-0.0.1 spec/support/dummy_repo.rb