Sha256: 5695a71cf14e4c21d6ead1e639edee27eae5435e10c584d171f3f77d7ca81772
Contents?: true
Size: 927 Bytes
Versions: 3
Compression:
Stored size: 927 Bytes
Contents
require 'test_helper' module HoganAssets module Config extend self def yml_path=(yml_path) @yml_path = yml_path end end class ConfigTest < Test::Unit::TestCase include TestSupport def setup HoganAssets::Config.env = 'test' HoganAssets::Config.yml_path = Pathname.new('.') + 'test/config/hogan_assets.yml' HoganAssets::Config.load_yml! end def teardown HoganAssets::Config.env = nil HoganAssets::Config.haml_options = nil HoganAssets::Config.template_extensions = nil HoganAssets::Config.yml_path = nil end def test_yaml_options scope = make_scope '/myapp/app/assets/javascripts', 'path/to/template.custom' template = HoganAssets::Tilt.new(scope.s_path) { "This is {{mustache}}" } assert_match /This is/, template.render(scope, {}) assert_equal HoganAssets::Config.haml_options, ugly: true end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
hogan_assets-1.6.0 | test/hogan_assets/config_test.rb |
hogan_assets-1.5.1 | test/hogan_assets/config_test.rb |
hogan_assets-1.5.0 | test/hogan_assets/config_test.rb |