Mordernize code base with __dir__ and require_relative

This commit is contained in:
Jean Boussier
2015-05-13 15:32:08 -04:00
parent 9e815ec594
commit b31df0fb3d
11 changed files with 24 additions and 26 deletions

View File

@@ -4,7 +4,7 @@ ENV["MT_NO_EXPECTATIONS"] = "1"
require 'minitest/autorun'
require 'spy/integration'
$:.unshift(File.join(File.expand_path(File.dirname(__FILE__)), '..', 'lib'))
$:.unshift(File.join(File.expand_path(__dir__), '..', 'lib'))
require 'liquid.rb'
require 'liquid/profiler'
@@ -25,7 +25,7 @@ end
module Minitest
class Test
def fixture(name)
File.join(File.expand_path(File.dirname(__FILE__)), "fixtures", name)
File.join(File.expand_path(__dir__), "fixtures", name)
end
end