Ken Dreyer
3e3a415457
tests: fix whitespace in hash_ordering_test
...
Indent two spaces, not one.
2014-07-28 16:36:43 +00:00
Ken Dreyer
deba039d6d
tests: reset "contains" op during IfElseTagTest
...
Two tests in IfElseTagTest each set a custom operator function for the
"contains" comparison operator.
The problem is that IfElseTagTest was clobbering the original operator
in Liquid and leaving it in an altered state.
As an example, ConditionUnitTest's test_contains_works_on_arrays relies
on the specific behavior of the "contains" operator, and its
test_contains_works_on_arrays was failing.
The problem was present when both test classes were require'd inside a
single ruby process. One example is "rake test", which runs "require" on
every test file. Another basic example is the following command:
ruby -Itest -e "require 'integration/tags/if_else_tag_test.rb';
require 'unit/condition_unit_test.rb'"
This would cause test_contains_works_on_arrays to fail.
Update IfElseTagTest to avoid clobbering the "contains" operator.
With this change, ConditionUnitTest's test_contains_works_on_arrays now
passes.
2014-07-28 16:36:43 +00:00
Ken Dreyer
ee4295c889
tests: switch to minitest
...
Ruby 1.9+ uses Minitest as the backend for Test::Unit. As of Minitest 5,
the shim has broken some compatibility with Test::Unit::TestCase in some
scenarios.
Adjusts the test suite to support Minitest 5's syntax.
Minitest versions 4 and below do not support the newer Minitest::Test
class that arrived in version 5. For that case, use the
MiniTest::Unit::TestCase class as a fallback
Conflicts:
test/integration/tags/for_tag_test.rb
test/test_helper.rb
2014-07-28 16:36:38 +00:00
Jason Hiltz-Laforge
052ef9fcb8
Reorder constructor to avoid referencing uninitialized variable when environment contains a self-referencing proc
2014-07-24 18:58:23 +00:00
Arthur Nogueira Neves
32e4f2d3b1
Merge pull request #240 from Shopify/remove_flatten
...
remove .flatten on standard filters
2014-07-24 10:54:28 -04:00
Florian Weingarten
6c6350f18b
Exception handling for humans
...
Ability to pass exception_handler as a block to #render
and provide whatever behavior you want on handling exceptions
https://github.com/Shopify/liquid/pull/254
2014-07-24 14:44:02 +00:00
Florian Weingarten
eae24373e6
remove unnecessary flatten filter
2014-07-24 02:56:57 +00:00
Florian Weingarten
0b45ffeada
add more legacy tests
2014-07-24 00:33:39 +00:00
Arthur Neves
18e8ce1eb0
add flatten filter
2014-07-23 17:16:20 -04:00
Florian Weingarten
994f309465
Fix broken standardfilter test
2014-07-23 17:15:39 -04:00
Arthur Neves
6a061cbe81
remove .flatten on standard filters
2014-07-23 17:14:26 -04:00
Arthur Nogueira Neves
c864a75903
Merge pull request #341 from curebit/comparation_argument_error
...
Raise Liquid::ArugmentError when condition has wrong usage
2014-07-23 17:03:31 -04:00
Jason Hiltz-Laforge
55597b8398
Fixing regression from block delimiter enhancement
2014-07-23 19:18:02 +00:00
Florian Weingarten
1e0e9f1f31
Remove unnecessary blank? code
2014-07-22 21:19:12 +00:00
Jason Hiltz-Laforge
0df3f1c372
Cache parsed markup parts to avoid repeated calls during template render
2014-07-21 15:55:06 +00:00
Jason Hiltz-Laforge
fd8c30070a
Adding tests, spy dependency
2014-07-16 15:05:45 +00:00
Florian Weingarten
0ac3ec7834
Revert "Merge pull request #352 from gaiottino/master"
...
This reverts commit 553b0926ae , reversing
changes made to 628ab3dc6a .
2014-07-08 14:48:19 +00:00
Florian Weingarten
8909c9f27a
add regression tests for #377
2014-07-08 14:47:39 +00:00
David Cornu
f57383af37
Allow tag classes to be reloaded when using Liquid.cache_classes is false
...
Because Liquid keeps a reference to tag classes, Rails class reloading may
cause problems with custom tags. This commit introduces a setting that
allows these classes to be resolved when required.
2014-07-02 20:03:18 +00:00
Florian Weingarten
114a37d9ba
add additional tests for https://github.com/jekyll/jekyll/pull/2505
2014-06-23 09:28:24 -04:00
Christian Blais
2239921804
[Liquid] Add round, ceil and floor standard filters
2014-06-16 11:15:53 -04:00
Arthur Neves
553b0926ae
Merge pull request #352 from gaiottino/master
...
Add error messages for missing variables when :strict
Conflicts:
History.md
2014-05-06 10:16:45 -04:00
Daniel Gaiottino
2bac6267f9
Add error messages for missing variables when :strict
2014-05-06 16:12:46 +02:00
Florian Weingarten
628ab3dc6a
add test for numerical sort
2014-05-04 19:50:38 -04:00
Thierry Joyal
ad1152853a
render! will properly force rethrow of errors if context is passed as an argument
2014-05-01 16:44:00 +00:00
David Cornu
8bc3792c0e
Move date coercion to #to_date
2014-04-30 22:32:36 +00:00
Florian Weingarten
2a12f253bf
Fix broken rendering of variables which are equal to false ( closes #345 )
2014-04-29 14:33:30 -04:00
Bogdan Gusiev
fa14fd02e7
Raise Liquid::ArugmentError when condition has wrong usage
...
Condition now raises ::ArgumentError when built wrongly.
This patch make it raise Liquid::ArgumentError instead
to indicate a liquid markup error instead of ruby error.
2014-04-21 16:42:37 +03:00
Dylan Thacker-Smith
7e45155aa9
Seperate unit and integration tests.
...
This makes it easier to re-use the integration tests in a seperate gem that
optimizes parts of liquid with a native implementation.
2014-03-26 15:47:07 -04:00
Dylan Thacker-Smith
f0afbc27e0
Add regression test for raw tags with open variable tags.
2014-03-24 10:01:03 -04:00
Dylan Thacker-Smith
fdf03076e0
Revert "Merge pull request #325 from Shopify/remove-variable-incomplete-end"
...
That pull request broke raw tags with open variable tags. E.g.
{% raw %}
{{
{% endraw %}
{{ 1 }}
This reverts commit fbaabf3b59 , reversing
changes made to af24d2c2ab .
2014-03-24 09:59:07 -04:00
Dylan Thacker-Smith
3682414cc4
Allow quoted single curly braces in variables.
2014-03-21 02:04:01 -04:00
Dylan Thacker-Smith
4ee43bc5d2
Merge pull request #324 from Shopify/multiline-tags-and-vars
...
Allow newlines in tags and variables.
2014-03-21 00:26:14 -04:00
Dylan Thacker-Smith
1320a69fca
Merge pull request #323 from Shopify/render_bang_in_tests
...
Use render! in tests to make debugging test failures easier.
2014-03-20 18:33:40 -04:00
Dylan Thacker-Smith
3b14e27f55
Allow newlines in tags and variables.
2014-03-20 17:27:03 -04:00
Dylan Thacker-Smith
d4ecaff8b8
Refactor to create tags with a parse class method instead of new.
...
By moving parse out of the initializer, we can call super at the start of
the initializers for subclasses, and avoid the nasty allocate hack.
2014-03-20 16:10:10 -04:00
Dylan Thacker-Smith
a5990042ff
Use render! in tests to make debugging test failures easier.
2014-03-20 12:04:17 -04:00
Dylan Thacker-Smith
92781ec43b
Move definition for TableRow to the tags folder.
2014-03-18 17:13:39 -04:00
Bogdan Gusiev
f23e69d565
Raise liquid argument error instead of ruby argument
...
Wrong number of arguments for filter invocation now raises
Liuqid::ArgumentError but not ::ArgumentError
2014-02-21 22:12:11 +02:00
Adam Doeler
5f8a028a56
Liquid::Drop should not return a string representation of standard ruby objects
2014-02-07 14:48:02 -05:00
Florian Weingarten
d2827bfa76
Add strip, lstrip, rstrip filters
2014-01-24 11:04:43 -05:00
Florian Weingarten
70d92b84ab
Rename test
2014-01-24 10:55:45 -05:00
Nicholas Jones
8f9f12e542
Merge remote-tracking branch 'upstream/master' into correct-if-nodelists
...
Conflicts:
test/liquid/tags/for_tag_test.rb
test/liquid/tags/if_else_tag_test.rb
2014-01-13 12:43:43 -08:00
Nicholas Jones
06e2f2577f
Add else blocks to for and case nodelists
2014-01-13 11:53:25 -08:00
Florian Weingarten
c6e0c1e490
Fix resource counting bug with respond_to?(:length)
2014-01-08 13:00:53 -05:00
Arthur Neves
a13f237d3c
Remove some 192 tests
2014-01-07 11:37:01 -05:00
Arthur Neves
208c6c8800
remove ruby-debug
2014-01-07 11:31:46 -05:00
Florian Weingarten
9ec2b9da2d
Rename tests because of name clashes (same method name used twice)
2014-01-07 11:20:32 -05:00
Florian Weingarten
be7bef4d0b
Merge pull request #284 from agladkyi/custom-patterns-for-template-filenames
...
Custom patterns for template filenames
2013-12-16 11:28:19 -08:00
Andrei Gladkyi
0ae42bbc32
Added separate test for custom patterns specifying
...
+ updated History.md
2013-12-16 17:48:43 +02:00