Module: Erptestcasehelpers

Defined in:
lib/erptestcasehelpers.rb,
lib/erptestcasehelpers/version.rb

Constant Summary collapse

VERSION =
"0.0.1"

Instance Method Summary collapse

Instance Method Details

#require(file) ⇒ Object



8
9
10
11
12
13
14
# File 'lib/erptestcasehelpers.rb', line 8

def require file
  if using_rake?
    require "./#{file}"
  else
    require "../../#{file}"
  end
end

#require_libs(folder) ⇒ Object



16
17
18
19
20
21
22
# File 'lib/erptestcasehelpers.rb', line 16

def require_libs folder
  if using_rake?
    require "./#{folder}/lib/imports"
  else
    require "./lib/imports"
  end
end

#using_rake?Boolean

Returns:

  • (Boolean)


4
5
6
# File 'lib/erptestcasehelpers.rb', line 4

def using_rake?
  Dir.pwd =~ /erp-testes$/
end