Sha256: 049f015b66ec5a114ba4d1fd77fe79ec28e970189dc7f5684ab3603ba782caca
Contents?: true
Size: 1.37 KB
Versions: 4
Compression:
Stored size: 1.37 KB
Contents
require 'rubygems' require 'spork' require 'mharris_ext' class SpecGitDir include FromHash attr_accessor :dir def setup! `cp -r #{dir}/git_dir #{dir}/.git` unless FileTest.exist?("#{dir}/.git") end def teardown! `rm -rf #{dir}/.git` if FileTest.exist?("#{dir}/.git") end class << self def make(name) dir = File.dirname(__FILE__) + "/input/#{name}" new(:dir => dir) end end end Spork.prefork do unless ENV['DRB'] require 'simplecov' SimpleCov.start end $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib')) $LOAD_PATH.unshift(File.dirname(__FILE__)) require 'rspec' # Requires supporting files with custom matchers and macros, etc, # in ./support/ and its subdirectories. Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each {|f| require f} RSpec.configure do |config| #config.filter_run :focus => true config.fail_fast = true repo_dirs = %w(repo) config.before(:all) do repo_dirs.each do |dir| SpecGitDir.make(dir).setup! end end config.after(:all) do repo_dirs.each do |dir| SpecGitDir.make(dir).teardown! end end end end Spork.each_run do if ENV['DRB'] require 'simplecov' SimpleCov.start end load File.dirname(__FILE__) + "/../lib/overapp.rb" #Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each {|f| load f} end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
overapp-0.5.1 | spec/spec_helper.rb |
overapp-0.5.0 | spec/spec_helper.rb |
overapp-0.4.1 | spec/spec_helper.rb |
overapp-0.4.0 | spec/spec_helper.rb |