Sha256: 572b43aa4d7f7c7c06ff55cb737ba0063de6ad70c8e684c036e50638659db646

Contents?: true

Size: 664 Bytes

Versions: 1

Compression:

Stored size: 664 Bytes

Contents

require 'rspec'
require 'cssquirt'
include CSSquirt

RSpec.configure do |config|
  config.color         = true
  config.formatter     = 'documentation'
  config.expect_with(:rspec) { |c| c.syntax = :should }

  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

1 entries across 1 versions & 1 rubygems

Version Path
cssquirt-0.0.2 spec/spec_helper.rb