Sha256: 1a12af2e1483e952653be162d11cd0dd564979c402a37f1aa1df7f369303116c

Contents?: true

Size: 1004 Bytes

Versions: 6

Compression:

Stored size: 1004 Bytes

Contents

require 'rubygems'
require 'bundler'
require 'simplecov'

# to silence streams
require 'active_support/core_ext/kernel/reporting'

# test coverage
SimpleCov.start

begin
  Bundler.setup(:default, :development)
rescue Bundler::BundlerError => e
  $stderr.puts e.message
  $stderr.puts "Run `bundle install` to install missing gems"
  exit e.status_code
end

require 'rspec'
require 'shoulda'

class SpecHelper
  def self.result name
    File.open(File.join(File.dirname(__FILE__), 'results', "#{name}.screen"), 'r').read
  end

  def self.silence
    silence_stream(STDOUT) do
      silence_stream(STDERR) do
        yield
      end
    end
  end

  def self.should_fail exit_on_fail, condition, msg
    if exit_on_fail
      "should exit with status #{Scide::EXIT[condition]} #{msg}"
    else
      "should raise an error with condition #{condition} #{msg}"
    end
  end
end

$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
$LOAD_PATH.unshift(File.dirname(__FILE__))
require 'scide'

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
scide-0.0.12 spec/helper.rb
scide-0.0.11 spec/helper.rb
scide-0.0.10 spec/helper.rb
scide-0.0.9 spec/helper.rb
scide-0.0.8 spec/helper.rb
scide-0.0.7 spec/helper.rb