Had the tests in the wrong file

This commit is contained in:
Tobias Lütke
2009-01-16 09:55:03 -05:00
parent 13ddc6d96b
commit 70ca647e1e
2 changed files with 13 additions and 12 deletions

View File

@@ -137,6 +137,18 @@ class StandardFiltersTest < Test::Unit::TestCase
def test_times
assert_template_result "12", "{{ 3 | times:4 }}"
assert_template_result "foofoofoofoo", "{{ 'foo' | times:4 }}"
end
def test_append
assigns = {'a' => 'bc', 'b' => 'd' }
assert_template_result('bcd',"{{ a | append: 'd'}}",assigns)
assert_template_result('bcd',"{{ a | append: b}}",assigns)
end
def test_prepend
assigns = {'a' => 'bc', 'b' => 'a' }
assert_template_result('abc',"{{ a | prepend: 'a'}}",assigns)
assert_template_result('abc',"{{ a | prepend: b}}",assigns)
end
def test_divided_by

View File

@@ -392,18 +392,7 @@ HERE
assigns = {'array' => [ 1, 2, 3] }
assert_template_result('321','{%for item in array reversed %}{{item}}{%endfor%}',assigns)
end
def test_append
assigns = {'a' => 'bc', 'b' => 'd' }
assert_template_result('bcd',"{{ a | append: 'd'}}",assigns)
assert_template_result('bcd',"{{ a | append: b}}",assigns)
end
def test_prepend
assigns = {'a' => 'bc', 'b' => 'a' }
assert_template_result('abc',"{{ a | prepend: 'a'}}",assigns)
assert_template_result('abc',"{{ a | prepend: b}}",assigns)
end
def test_ifchanged
assigns = {'array' => [ 1, 1, 2, 2, 3, 3] }