Shopify/liquid — pull request #323 by dylanahsmith (2014-03-20 16:10:20+00:00)
Title: Use render! in tests to make debugging test failures easier.

@fw42 or @arthurnn for review

## Problem

Previously it would be common to see an error like the following in the tests:

```
<"23"> expected but was
<"Liquid error: wrong number of arguments (1 for 2)">.
```

It would be nice to see the error name and whole backtrace in cases like this.

## Solution

Use Template#render! in the tests to prevent liquid from catching and rendering the errors.

Now we would see something like this instead:

```
ArgumentError: wrong number of arguments (1 for 2)
/Users/dylansmith/src/liquid/lib/liquid/tags/for.rb:68:in `render'
/Users/dylansmith/src/liquid/lib/liquid/block.rb:137:in `block in render_all'
/Users/dylansmith/src/liquid/lib/liquid/block.rb:124:in `each'
/Users/dylansmith/src/liquid/lib/liquid/block.rb:124:in `render_all'
/Users/dylansmith/src/liquid/lib/liquid/block.rb:110:in `render'
/Users/dylansmith/src/liquid/lib/liquid/template.rb:150:in `render'
/Users/dylansmith/src/liquid/lib/liquid/template.rb:160:in `render!'
/Users/dylansmith/src/liquid/test/test_helper.rb:29:in `assert_template_result'
/Users/dylansmith/src/liquid/test/liquid/tags/unless_else_tag_test.rb:20:in `test_unless_in_loop'
/Users/dylansmith/.rbenv/versions/2.1.0-github/lib/ruby/2.1.0/minitest/unit.rb:1265:in `run'
/Users/dylansmith/.rbenv/versions/2.1.0-github/lib/ruby/2.1.0/test/unit/testcase.rb:17:in `run'
/Users/dylansmith/.rbenv/versions/2.1.0-github/lib/ruby/2.1.0/minitest/unit.rb:940:in `block in _run_suite'
/Users/dylansmith/.rbenv/versions/2.1.0-github/lib/ruby/2.1.0/minitest/unit.rb:933:in `map'
/Users/dylansmith/.rbenv/versions/2.1.0-github/lib/ruby/2.1.0/minitest/unit.rb:933:in `_run_suite'
/Users/dylansmith/.rbenv/versions/2.1.0-github/lib/ruby/2.1.0/test/unit.rb:663:in `block in _run_suites'
/Users/dylansmith/.rbenv/versions/2.1.0-github/lib/ruby/2.1.0/test/unit.rb:661:in `each'
/Users/dylansmith/.rbenv/versions/2.1.0-github/lib/ruby/2.1.0/test/unit.rb:661:in `_run_suites'
/Users/dylansmith/.rbenv/versions/2.1.0-github/lib/ruby/2.1.0/minitest/unit.rb:884:in `_run_anything'
/Users/dylansmith/.rbenv/versions/2.1.0-github/lib/ruby/2.1.0/minitest/unit.rb:1092:in `run_tests'
/Users/dylansmith/.rbenv/versions/2.1.0-github/lib/ruby/2.1.0/minitest/unit.rb:1079:in `block in _run'
/Users/dylansmith/.rbenv/versions/2.1.0-github/lib/ruby/2.1.0/minitest/unit.rb:1078:in `each'
/Users/dylansmith/.rbenv/versions/2.1.0-github/lib/ruby/2.1.0/minitest/unit.rb:1078:in `_run'
/Users/dylansmith/.rbenv/versions/2.1.0-github/lib/ruby/2.1.0/minitest/unit.rb:1066:in `run'
/Users/dylansmith/.rbenv/versions/2.1.0-github/lib/ruby/2.1.0/test/unit.rb:27:in `run'
/Users/dylansmith/.rbenv/versions/2.1.0-github/lib/ruby/2.1.0/test/unit.rb:780:in `run'
/Users/dylansmith/.rbenv/versions/2.1.0-github/lib/ruby/2.1.0/test/unit.rb:372:in `block (2 levels) in autorun'
/Users/dylansmith/.rbenv/versions/2.1.0-github/lib/ruby/2.1.0/test/unit.rb:33:in `run_once'
/Users/dylansmith/.rbenv/versions/2.1.0-github/lib/ruby/2.1.0/test/unit.rb:371:in `block in autorun'
```

and know that the Liquid::For#render has the wrong signature.