Sha256: e43ce0d5f18d4f7d4b6fae72a026471e8d61b5cbdd384e0cff0276ce156aaa28

Contents?: true

Size: 446 Bytes

Versions: 44

Compression:

Stored size: 446 Bytes

Contents

# frozen_string_literal: true
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

44 entries across 44 versions & 1 rubygems

Version Path
onotole-2.0.2 spec/support/fake_github.rb
onotole-2.0.1 spec/support/fake_github.rb
onotole-2.0.0 spec/support/fake_github.rb
onotole-1.2.11 spec/support/fake_github.rb
onotole-1.2.10 spec/support/fake_github.rb
onotole-1.2.9 spec/support/fake_github.rb
onotole-1.2.8 spec/support/fake_github.rb
onotole-1.2.7 spec/support/fake_github.rb
onotole-1.2.6 spec/support/fake_github.rb
onotole-1.2.5 spec/support/fake_github.rb
onotole-1.2.4 spec/support/fake_github.rb
onotole-1.2.3 spec/support/fake_github.rb
onotole-1.2.2 spec/support/fake_github.rb
onotole-1.2.1 spec/support/fake_github.rb
onotole-1.1.21 spec/support/fake_github.rb
onotole-1.1.20 spec/support/fake_github.rb
onotole-1.1.19 spec/support/fake_github.rb
onotole-1.1.18 spec/support/fake_github.rb
onotole-1.1.17 spec/support/fake_github.rb
onotole-1.1.16 spec/support/fake_github.rb