Skip to content

Commit

Permalink
Fix assertions to restore 1.8.7 compatibility
Browse files Browse the repository at this point in the history
Flipping the order of the assert_match arguments works in 1.9.3, but in
1.8.7 it makes Test::Unit choke.
  • Loading branch information
joliss committed May 8, 2012
1 parent 578ad68 commit ce70b91
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/hjstemplate_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -57,13 +57,13 @@ def with_template_root(root, sep=nil)
test "asset pipeline should serve template" do
get "/assets/templates/test.js"
assert_response :success
assert_match @response.body, /Ember\.TEMPLATES\["test"\] = Ember\.Handlebars\.template\(function .*"test"/m
assert_match /Ember\.TEMPLATES\["test"\] = Ember\.Handlebars\.template\(function .*"test"/m, @response.body
end

test "should unbind mustache templates" do
get "/assets/templates/hairy.mustache"
assert_response :success
assert_match @response.body, /Ember\.TEMPLATES\["hairy"\] = Ember\.Handlebars\.template\(function .*unbound/m
assert_match /Ember\.TEMPLATES\["hairy"\] = Ember\.Handlebars\.template\(function .*unbound/m, @response.body
end

test "ensure new lines inside the anon function are persisted" do
Expand Down

0 comments on commit ce70b91

Please sign in to comment.