Sha256: 1d7e9c731b5814433a14cef9bcc2c28b1bef991b7037cca29073fed55f0f14ab

Contents?: true

Size: 928 Bytes

Versions: 2

Compression:

Stored size: 928 Bytes

Contents

require 'handlebars_assets'
require 'handlebars_assets/config'
require 'handlebars_assets/tilt_handlebars'
require 'handlebars_assets/handlebars'

require 'test/unit'

module SprocketsScope
  # 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 }
    end.new
  end
end

module HandlebarsAssets
  module Config
    extend self

    def reset!
      @compiler = nil
      @compiler_path = nil
      @haml_options = nil
      @known_helpers = nil
      @known_helpers_only = nil
      @options = nil
      @path_prefix = nil
      @template_namespace = nil
    end

  end

  class Handlebars

    def self.reset!
      @context = nil
      @source = nil
      @path = nil
      @assets_path = nil
    end

  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
handlebars_assets-0.7.1 test/test_helper.rb
handlebars_assets-0.7.0 test/test_helper.rb