aboutsummaryrefslogtreecommitdiffstats
path: root/spec/integration/alaveteli_dsl.rb
diff options
context:
space:
mode:
authorLouise Crow <louise.crow@gmail.com>2014-09-01 13:35:41 +0100
committerLouise Crow <louise.crow@gmail.com>2014-09-01 13:35:41 +0100
commit72754b319b154ae175458750dafa597f8115d3b0 (patch)
treea603acb99a4128992007b827d8ff80a9e8488787 /spec/integration/alaveteli_dsl.rb
parentbaf8be95fff5c00688af6f0fae72392600ee9254 (diff)
Add integration spec.0.19.0.1hotfix/0.19.0.1
Diffstat (limited to 'spec/integration/alaveteli_dsl.rb')
-rw-r--r--spec/integration/alaveteli_dsl.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/spec/integration/alaveteli_dsl.rb b/spec/integration/alaveteli_dsl.rb
index 119bb05a0..1d56abbdf 100644
--- a/spec/integration/alaveteli_dsl.rb
+++ b/spec/integration/alaveteli_dsl.rb
@@ -64,5 +64,14 @@ def close_request(request)
request.save!
end
+def cache_directories_exist?(request)
+ cache_path = File.join(Rails.root, 'cache', 'views')
+ paths = [File.join(cache_path, 'request', request.request_dirs)]
+ I18n.available_locales.each do |locale|
+ paths << File.join(cache_path, locale.to_s, 'request', request.request_dirs)
+ end
+ paths.any?{ |path| File.exist?(path) }
+end
+