1
0
Fork 0
mirror of https://github.com/haml/haml.git synced 2022-11-09 12:33:31 -05:00

Removed the tupleize shit

git-svn-id: svn://hamptoncatlin.com/haml/trunk@25 7063305b-7217-0410-af8c-cdc13e5119b9
This commit is contained in:
packagethief 2006-09-01 19:50:28 +00:00
parent 26360e28d3
commit cf68e5a40c
3 changed files with 1 additions and 12 deletions

View file

@ -5,13 +5,6 @@ module HAMLHelpers
input.gsub(/\n/, '
').gsub(/\r/, '')
end
def tupleize(first, second)
second = second.reverse
first.collect do |f|
[f, second.pop]
end
end
def find_and_flatten(input)
sets = input.scan(/<(textarea|code|pre)[^>]*>(.*?)<\/\1>/im)
sets.each do |thing|

View file

@ -25,7 +25,7 @@ class HamlTest < Test::Unit::TestCase
end
def assert_renders_correctly(name)
tupleize(load_result(name).scan(/\n/), @base.render(name).scan(/\n/)).each do |pair|
load_result(name).scan(/\n/).zip(@base.render(name).scan(/\n/)).each do |pair|
#test each line to make sure it matches... (helps with error messages to do them seperately)
assert_equal(pair.first, pair.last)
end

View file

@ -7,10 +7,6 @@ require 'action_view'
class HamlTest < Test::Unit::TestCase
include HAMLHelpers
def test_tupleize
assert_equal(tupleize([1,2,3], [4,5,6]), [[1,4],[2,5],[3,6]])
end
def test_find_and_flatten
assert_equal(find_and_flatten("<br/><textarea></textarea><br/>"),
"<br/><textarea></textarea><br/>")