forked from janosrusiczki/japr
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhelper.rb
37 lines (30 loc) · 793 Bytes
/
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
require 'coveralls'
Coveralls.wear!
require 'rubygems'
gem 'minitest' # Ensures we are using the gem and not the stdlib
require 'minitest/autorun'
require 'minitest/pride'
require './spec/helpers/extensions/ruby/module'
require 'japr'
include JAPR
module MiniTest
class Spec
# Fetch current path
def current_path
File.expand_path(File.dirname(__FILE__))
end
def source_path
File.join(File.expand_path(File.dirname(__FILE__)), 'resources', 'source')
end
def temp_path
File.join(File.expand_path(File.dirname(__FILE__)), 'resources', 'temp')
end
def clear_temp_path
FileUtils.remove_dir(temp_path, force: true)
end
# Let us use 'context' in specs
class << self
alias_method :context, :describe
end
end
end