-
Notifications
You must be signed in to change notification settings - Fork 63
/
spec_helper.rb
42 lines (33 loc) · 966 Bytes
/
spec_helper.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
begin
require 'coveralls'
Coveralls.wear_merged!
rescue LoadError
end
require 'fileutils'
require 'stringio'
require 'rspec'
DAEMON_ENV = "test"
DAEMON_ROOT = File.expand_path('../../tmp/daemon', __FILE__)
$:.unshift( File.dirname(__FILE__) + '/../lib' )
require 'daemon_kit'
# Requires supporting ruby files with custom matchers and macros, etc,
# in spec/support/ and its subdirectories.
Dir[ File.expand_path("../support/**/*.rb", __FILE__) ].each { |f| require f }
require 'rake/file_list'
RSpec.configure do |config|
# == Mock Framework
#
# RSpec uses it's own mocking framework by default. If you prefer to
# use mocha, flexmock or RR, uncomment the appropriate line:
#
# config.mock_with :mocha
# config.mock_with :flexmock
# config.mock_with :rr
config.before(:all) do
FileUtils.rm_rf("#{DAEMON_ROOT}/*")
FileUtils.mkdir_p( DAEMON_ROOT )
end
config.after(:all) do
FileUtils.rm_rf("#{DAEMON_ROOT}/*")
end
end