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

Version Path
logstash-filter-cache-redis-0.1.0 vendor/bundle/jruby/1.9/gems/clamp-0.6.5/spec/spec_helper.rb
logstash-filter-csharp-0.1.0 vendor/bundle/jruby/2.3.0/gems/clamp-0.6.5/spec/spec_helper.rb
logstash-filter-htmlentities-0.1.0 vendor/bundle/jruby/1.9/gems/clamp-0.6.5/spec/spec_helper.rb
logstash-output-icinga-1.0.0 vendor/jruby/1.9/gems/clamp-0.6.5/spec/spec_helper.rb
logstash-filter-zabbix-0.1.2 vendor/bundle/jruby/1.9/gems/clamp-0.6.5/spec/spec_helper.rb
logstash-filter-zabbix-0.1.1 vendor/bundle/jruby/1.9/gems/clamp-0.6.5/spec/spec_helper.rb
logstash-input-fifo-0.9.1 vendor/bundle/jruby/1.9/gems/clamp-0.6.5/spec/spec_helper.rb
logstash-input-fifo-0.9.0 vendor/bundle/jruby/1.9/gems/clamp-0.6.5/spec/spec_helper.rb
logstash-input-salesforce-3.0.0 vendor/jruby/1.9/gems/clamp-0.6.5/spec/spec_helper.rb
ivanvc-logstash-input-s3-3.1.1.4 vendor/local/gems/clamp-0.6.5/spec/spec_helper.rb
ivanvc-logstash-input-s3-3.1.1.3 vendor/local/gems/clamp-0.6.5/spec/spec_helper.rb
ivanvc-logstash-input-s3-3.1.1.2 vendor/local/gems/clamp-0.6.5/spec/spec_helper.rb
clamp-1.0.1 spec/spec_helper.rb
logstash-filter-delta-1.1.0 vendor/bundle/jruby/2.2.0/gems/clamp-0.6.5/spec/spec_helper.rb
logstash-filter-delta-1.0.1 vendor/bundle/jruby/2.2.0/gems/clamp-0.6.5/spec/spec_helper.rb
logstash-filter-base64-1.0.4 vendor/bundle/jruby/2.2.0/gems/clamp-0.6.5/spec/spec_helper.rb
logstash-filter-base64-1.0.3 vendor/bundle/jruby/2.2.0/gems/clamp-0.6.5/spec/spec_helper.rb
logstash-filter-delta-1.0.0 vendor/bundle/jruby/2.2.0/gems/clamp-0.6.5/spec/spec_helper.rb
logstash-filter-base64-1.0.2 vendor/bundle/jruby/2.3.0/gems/clamp-0.6.5/spec/spec_helper.rb
logstash-filter-base64-1.0.1 vendor/bundle/jruby/2.3.0/gems/clamp-0.6.5/spec/spec_helper.rb