Sha256: d8ed31b9eb1880eda730b4d5fb27b03a5216064a43c9dcfd948329ddf86b9bfe

Contents?: true

Size: 721 Bytes

Versions: 13

Compression:

Stored size: 721 Bytes

Contents

ENV['RACK_ENV'] = "test"
require 'simplecov'
SimpleCov.start

# Use simplecov with forking specs
pid = Process.pid
SimpleCov.at_exit do
  SimpleCov.result.format! if Process.pid == pid
end

require 'bait'
require 'fileutils'

def repo_path
  path = File.join(File.dirname(__FILE__), '..')
  File.expand_path(path)
end

def clear_storage
  FileUtils.rm_rf Bait.storage_dir
end

def clear_db
  Dir.glob(File.join(Bait.db_dir, "*")).map do |f|
    File.open(f, 'w')
  end
end

require 'support/script_maker'
require 'rack/test'

RSpec.configure do |config|
  config.before(:suite) { clear_storage }
  config.before(:each) { clear_db }
  config.include Bait::SpecHelpers::ScriptMaker
  config.include Rack::Test::Methods
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
bait-0.5.13 spec/spec_helper.rb
bait-0.5.12 spec/spec_helper.rb
bait-0.5.11 spec/spec_helper.rb
bait-0.5.10 spec/spec_helper.rb
bait-0.5.9 spec/spec_helper.rb
bait-0.5.6 spec/spec_helper.rb
bait-0.5.5 spec/spec_helper.rb
bait-0.5.4 spec/spec_helper.rb
bait-0.5.2 spec/spec_helper.rb
bait-0.5.1 spec/spec_helper.rb
bait-0.5.0 spec/spec_helper.rb
bait-0.4.1 spec/spec_helper.rb
bait-0.4.0 spec/spec_helper.rb