Sha256: fa42efc61a59ed167381a2bf50c2e4f3ea932922649e10d22b38103795d7338c

Contents?: true

Size: 685 Bytes

Versions: 7

Compression:

Stored size: 685 Bytes

Contents

$:.unshift File.expand_path(File.dirname(__FILE__) + "/../lib")
$:.unshift File.expand_path(File.dirname(__FILE__) + "/generated")

require 'rubygems'
require 'rspec'
require 'rbplusplus'

include RbPlusPlus

module FileDirectoryHelpers
  def full_dir(path)
    File.expand_path(File.join(File.dirname(__FILE__), path))
  end
end

module TestHelpers
  def clear_info
    `rm -rf #{full_dir('generated')}/*`
  end

  def silence_logging
    RbPlusPlus::Logger.silent!
  end

  def test_setup
    clear_info
    silence_logging
  end
end

RSpec.configure do |config|
  config.include(FileDirectoryHelpers)
  config.include(TestHelpers)

  config.before(:all) do
    test_setup
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
rbplusplus-1.3.0 test/test_helper.rb
rbplusplus-1.2.1 test/test_helper.rb
rbplusplus-1.2.0 test/test_helper.rb
rbplusplus-1.1.0 test/test_helper.rb
rbplusplus-1.0.3 test/test_helper.rb
rbplusplus-1.0.1 test/test_helper.rb
rbplusplus-1.0 test/test_helper.rb