Sha256: 7e63e9b24e05c6d319a8409a97c80623c069934342c64f4698991afe4786eab3

Contents?: true

Size: 523 Bytes

Versions: 24

Compression:

Stored size: 523 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

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

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
potassium-7.2.0 spec/support/fake_github.rb
potassium-7.1.0 spec/support/fake_github.rb
potassium-7.0.0 spec/support/fake_github.rb
potassium-6.7.0 spec/support/fake_github.rb
potassium-6.6.0 spec/support/fake_github.rb
potassium-6.5.0 spec/support/fake_github.rb
potassium-6.4.0 spec/support/fake_github.rb
potassium-6.3.0 spec/support/fake_github.rb
potassium-6.2.0 spec/support/fake_github.rb
potassium-6.1.0 spec/support/fake_github.rb
potassium-6.0.0 spec/support/fake_github.rb
potassium-5.2.3 spec/support/fake_github.rb
potassium-5.2.2 spec/support/fake_github.rb
potassium-5.2.1 spec/support/fake_github.rb
potassium-5.2.0 spec/support/fake_github.rb
potassium-5.1.4 spec/support/fake_github.rb
potassium-5.1.3 spec/support/fake_github.rb
potassium-5.1.2 spec/support/fake_github.rb
potassium-5.1.1 spec/support/fake_github.rb
potassium-3.0.0 spec/support/fake_github.rb