Sha256: fc18107b7373f6a4586dd293d01119f27f7a2a2403235b413b8b45666e187e5f
Contents?: true
Size: 755 Bytes
Versions: 69
Compression:
Stored size: 755 Bytes
Contents
require "rspec" require "clamp" require 'stringio' RSpec.configure do |config| config.mock_with :rr end module OutputCapture def self.included(target) target.before do $stdout = @out = StringIO.new $stderr = @err = StringIO.new end target.after do $stdout = STDOUT $stderr = STDERR end end def stdout @out.string end def stderr @err.string end end module CommandFactory def given_command(name, &block) let(:command_class) do Class.new(Clamp::Command, &block) end let(:command) do command_class.new(name) end end end module SetEnv def set_env(name, value) if value ENV[name] = value else ENV.delete(name) end end end
Version data entries
69 entries across 65 versions & 18 rubygems