[Tests] Process expected result files thru erb to account for more transient behaviors across different systems.
This commit is contained in:
parent
f312a24012
commit
9b8830b891
@ -77,7 +77,7 @@ private
|
|||||||
actual_result_file = "#{tempfile_path(@current_project)}/#{name}.css"
|
actual_result_file = "#{tempfile_path(@current_project)}/#{name}.css"
|
||||||
expected_result_file = "#{result_path(@current_project)}/#{name}.css"
|
expected_result_file = "#{result_path(@current_project)}/#{name}.css"
|
||||||
actual_lines = File.read(actual_result_file).split("\n")
|
actual_lines = File.read(actual_result_file).split("\n")
|
||||||
expected_lines = File.read(expected_result_file).split("\n")
|
expected_lines = ERB.new(File.read(expected_result_file)).result(binding).split("\n")
|
||||||
expected_lines.zip(actual_lines).each_with_index do |pair, line|
|
expected_lines.zip(actual_lines).each_with_index do |pair, line|
|
||||||
message = "template: #{name}\nline: #{line + 1}"
|
message = "template: #{name}\nline: #{line + 1}"
|
||||||
assert_equal(pair.first, pair.last, message)
|
assert_equal(pair.first, pair.last, message)
|
||||||
|
@ -1 +1 @@
|
|||||||
test { background: url('../assets/images/testing.png?1258839056'); }
|
test { background: url('../assets/images/testing.png?<%= File.mtime(File.join(Compass.configuration.project_path, 'assets', 'images', 'testing.png')).strftime("%s") %>'); }
|
||||||
|
Loading…
Reference in New Issue
Block a user