added current-output-file()
This commit is contained in:
parent
60ed9581e2
commit
81d2a44ef4
@ -16,4 +16,8 @@ module Compass::SassExtensions::Functions::Env
|
||||
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 @@ private
|
||||
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 @@ private
|
||||
@filename
|
||||
end
|
||||
|
||||
def output_file
|
||||
@output_file
|
||||
end
|
||||
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user