test/test_helper.rb in hogan_assets-1.4.0 vs test/test_helper.rb in hogan_assets-1.5.0
- old
+ new
@@ -1,5 +1,18 @@
-require 'hogan_assets/tilt'
-require 'hogan_assets/hogan'
-require 'hogan_assets/config'
+require 'hogan_assets'
require 'test/unit'
+
+module TestSupport
+ # Try to act like sprockets.
+ def make_scope(root, file)
+ Class.new do
+ define_method(:logical_path) { pathname.to_s.gsub(root + '/', '').gsub(/\..*/, '') }
+
+ define_method(:pathname) { Pathname.new(root) + file }
+
+ define_method(:root_path) { root }
+
+ define_method(:s_path) { pathname.to_s }
+ end.new
+ end
+end