Tweak test formatting; fix order-dependent failure
The order-dependent failure has been been commented in code. After manually bisecting the test suite, I was able to determine that the template cascade tests were leaving the `@@template_priority_path` set to an overridden value in tests run afterward.
This commit is contained in:
@@ -11,9 +11,13 @@ module Precious
|
||||
end
|
||||
|
||||
def first_path_available(name)
|
||||
priority = File.join(template_priority_path, "#{name}.#{template_extension}")
|
||||
default = File.join(template_path, "#{name}.#{template_extension}")
|
||||
File.exists?(priority) ? priority : default
|
||||
priority =
|
||||
if template_priority_path
|
||||
File.join(template_priority_path, "#{name}.#{template_extension}")
|
||||
end
|
||||
|
||||
priority && File.exists?(priority) ? priority : default
|
||||
end
|
||||
|
||||
# Method should track lib/mustache/settings.rb from Mustache project.
|
||||
|
||||
Reference in New Issue
Block a user