Sha256: 39ec7fede85b2af29a0e89bca1e9a4f5344d4699bb2d1aecf2bcaa0c590abe11

Contents?: true

Size: 607 Bytes

Versions: 2

Compression:

Stored size: 607 Bytes

Contents

require 'rspec'
require 'cssquirt'
include CSSquirt

RSpec.configure do |config|
  config.color_enabled = true
  config.formatter     = 'documentation'

  config.before(:all) { silence_output }
  config.after(:all)  { enable_output }
end


# Redirects stderr and stdout to /dev/null.
# Helpers from https://gist.github.com/adamstegman/926858
def silence_output
  @orig_stderr = $stderr
  @orig_stdout = $stdout
  $stderr = File.new('/dev/null', 'w')
  $stdout = File.new('/dev/null', 'w')
end

def enable_output
  $stderr = @orig_stderr
  $stdout = @orig_stdout
  @orig_stderr = nil
  @orig_stdout = nil
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
cssquirt-0.0.1 spec/spec_helper.rb
cssquirt-0.0.1.pre.1 spec/spec_helper.rb