From 9b8830b8913686d7019e0347176e58a747c8a32a Mon Sep 17 00:00:00 2001 From: Chris Eppstein Date: Tue, 24 Nov 2009 08:29:02 -0800 Subject: [PATCH] [Tests] Process expected result files thru erb to account for more transient behaviors across different systems. --- test/compass_test.rb | 2 +- test/fixtures/stylesheets/relative/css/screen.css | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/test/compass_test.rb b/test/compass_test.rb index 4d570fed..7dff4904 100644 --- a/test/compass_test.rb +++ b/test/compass_test.rb @@ -77,7 +77,7 @@ private actual_result_file = "#{tempfile_path(@current_project)}/#{name}.css" expected_result_file = "#{result_path(@current_project)}/#{name}.css" 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| message = "template: #{name}\nline: #{line + 1}" assert_equal(pair.first, pair.last, message) diff --git a/test/fixtures/stylesheets/relative/css/screen.css b/test/fixtures/stylesheets/relative/css/screen.css index 8c64d3b9..a076f52a 100644 --- a/test/fixtures/stylesheets/relative/css/screen.css +++ b/test/fixtures/stylesheets/relative/css/screen.css @@ -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") %>'); }