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
This commit is contained in:
Ken Dreyer
2014-07-28 16:33:42 +00:00
committed by Florian Weingarten
parent a8e63ff03d
commit ee4295c889
44 changed files with 148 additions and 173 deletions

View File

@@ -63,7 +63,7 @@ class ArrayLike
end
end
class ContextUnitTest < Test::Unit::TestCase
class ContextUnitTest < Minitest::Test
include Liquid
def setup
@@ -107,16 +107,14 @@ class ContextUnitTest < Test::Unit::TestCase
end
def test_scoping
assert_nothing_raised do
@context.push
@context.push
@context.pop
assert_raises(Liquid::ContextError) do
@context.pop
end
assert_raise(Liquid::ContextError) do
@context.pop
end
assert_raise(Liquid::ContextError) do
assert_raises(Liquid::ContextError) do
@context.push
@context.pop
@context.pop