Sha256: a3f8fd633b687c1351a5de4615c53864e6f50d84a7a07786b8386ada0edc5f9e
Contents?: true
Size: 858 Bytes
Versions: 1
Compression:
Stored size: 858 Bytes
Contents
$:.unshift(File.dirname(__FILE__)) $:.unshift(File.join(File.dirname(__FILE__), '..', 'lib')) #require 'rspec/mocks' require 'applix' require 'applix/oattr' begin require 'byebug' rescue LoadError puts " !! no byebug on #{RUBY_PLATFORM}(#{RUBY_VERSION}) ;-)" end RSpec.configure do |config| config.before :each do end config.after :each do end # disable $crux debug flag after each test config.after(:each) { $crux = false } config.expect_with :rspec do |c| c.syntax = [:should, :expect] end end # captures standard output streams to help testing console I/O # def capture(*streams) streams.map! { |stream| stream.to_s } begin result = StringIO.new streams.each { |stream| eval "$#{stream} = result" } yield ensure streams.each { |stream| eval("$#{stream} = #{stream.upcase}") } end result.string end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
applix-0.4.14 | spec/spec_helper.rb |