Sha256: def9632f1f033ce9b0771bf45304cff79e482818837d00c9ddd70839e0218675

Contents?: true

Size: 418 Bytes

Versions: 5

Compression:

Stored size: 418 Bytes

Contents

class FakeGithub
  RECORDER = File.expand_path(File.join('..', '..', 'tmp', 'hub_commands'), File.dirname(__FILE__))

  def initialize(args)
    @args = args
  end
  
  def run!
    File.open(RECORDER, 'a') do |file|
      file.write @args.join(' ')
    end
  end

  def self.clear!
    FileUtils.rm_rf RECORDER
  end

  def self.has_created_repo?(repo_name)
    File.read(RECORDER) == "create #{repo_name}"
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
roboparts-0.6.4 spec/support/fake_github.rb
roboparts-0.6.3 spec/support/fake_github.rb
roboparts-0.6.2 spec/support/fake_github.rb
roboparts-0.6.1 spec/support/fake_github.rb
roboparts-0.6.0 spec/support/fake_github.rb