Sha256: 580a554234558895c87e708c1815d86e17916ff7898328d0080d90a780591102
Contents?: true
Size: 838 Bytes
Versions: 7
Compression:
Stored size: 838 Bytes
Contents
require 'rubygems' require 'bundler/setup' require 'rspec/mocks' require 'webmock/rspec' require 'pry' RSpec::Mocks::setup(Object.new) require 'thegarage/gitx/cli' RSpec.configure do |config| config.mock_with :rspec def capture_with_status(stream) exit_status = 0 begin stream = stream.to_s eval "$#{stream} = StringIO.new" begin yield rescue SystemExit => system_exit # catch any exit calls exit_status = system_exit.status end result = eval("$#{stream}").string ensure eval("$#{stream} = #{stream.upcase}") end return result, exit_status end def remove_directories(*names) project_dir = Pathname.new(Dir.pwd) names.each do |name| FileUtils.rm_rf(project_dir.join(name)) if FileTest.exists?(project_dir.join(name)) end end end
Version data entries
7 entries across 7 versions & 1 rubygems