Permalink
Browse files

added current-output-file()

  • Loading branch information...
1 parent 60ed958 commit 81d2a44ef4e7fd084279cc3602770725e85fc37f @scottdavis scottdavis committed Mar 23, 2012
@@ -16,4 +16,8 @@ def current_source_file
Sass::Script::String.new(options[:filename].to_s)
end
+ def current_output_file
+ Sass::Script::String.new(options[:css_filename].to_s)
+ end
+
end
@@ -5,4 +5,6 @@
.date {
date: "<%= Time.now.strftime("%F") %>"; }
.filename {
- file: <%= filename.gsub(%r{/scss/}, '/sass/') %>; }
+ file: <%= filename.gsub(%r{/scss/}, '/sass/') %>; }
+.output {
+ output: <%= output_file %>; }
@@ -12,4 +12,8 @@
.filename {
file: current-source-file();
+}
+
+.output {
+ output: current-output-file();
}
@@ -138,7 +138,7 @@ def assert_no_errors(css_file, project_name)
def assert_renders_correctly(*arguments)
options = arguments.last.is_a?(Hash) ? arguments.pop : {}
for name in arguments
- actual_result_file = "#{tempfile_path(@current_project)}/#{name}.css"
+ @output_file = actual_result_file = "#{tempfile_path(@current_project)}/#{name}.css"
expected_result_file = "#{result_path(@current_project)}/#{name}.css"
@filename = expected_result_file.gsub('css', 'scss')
actual_lines = File.read(actual_result_file)
@@ -226,4 +226,8 @@ def filename
@filename
end
+ def output_file
+ @output_file
+ end
+
end

0 comments on commit 81d2a44

Please sign in to comment.