Skip to content

Commit

Permalink
cleanup and fix some test issues
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexRiedler committed Jun 21, 2014
1 parent 32846d6 commit 3b6bf7f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions lib/handlebars_assets/config.rb
Expand Up @@ -94,19 +94,19 @@ def template_namespace
end

def handlebars_extensions
@hbs_extensions ||= ['.hbs', 'handlebars']
@hbs_extensions ||= ['hbs', 'handlebars']
end

def hamlbars_extensions
@hamlbars_extensions ||= ['.hamlbars']
@hamlbars_extensions ||= ['hamlbars']
end

def slimbars_extensions
@slimbars_extensions ||= ['.slimbars']
@slimbars_extensions ||= ['slimbars']
end

def ember_extensions
@ember_extensions ||= ['.ember']
@ember_extensions ||= ['ember']
end

private
Expand Down
4 changes: 2 additions & 2 deletions test/handlebars_assets/tilt_handlebars_test.rb
Expand Up @@ -171,7 +171,7 @@ def test_multiple_frameworks_with_ember_render
# File without ember extension but with ember in it should compile to default namespace
scope = make_scope root, non_ember_but_with_ember
source = "This is {{handlebars}}"
template = HandlebarsAssets::TiltHandlebars.new(scope.pathname.to_s) { source }
template = HandlebarsAssets::HandlebarsTemplate.new(scope.pathname.to_s) { source }
assert_equal hbs_compiled('test_member', source), template.render(scope, {})

# File with ember extension should compile to ember specific namespace
Expand All @@ -183,7 +183,7 @@ def test_multiple_frameworks_with_ember_render
# File with ember and erb extension should compile to ember specific namespace
expected_compiled = %{window.Ember.TEMPLATES["test_render"] = Ember.Handlebars.compile("This is {{handlebars}}");};
scope = make_scope root, ember_ext_with_erb
template = HandlebarsAssets::TiltHandlebars.new(scope.pathname.to_s) { source }
template = HandlebarsAssets::HandlebarsTemplate.new(scope.pathname.to_s) { source }
assert_equal expected_compiled, template.render(scope, {})

# File with ember.hbs extension should compile to ember specific namespace
Expand Down

0 comments on commit 3b6bf7f

Please sign in to comment.