aboutsummaryrefslogtreecommitdiffstats
path: root/spec/spec_helper.rb
diff options
context:
space:
mode:
authorLouise Crow <louise.crow@gmail.com>2012-10-01 11:03:52 +0100
committerLouise Crow <louise.crow@gmail.com>2012-10-01 11:03:52 +0100
commitbe96333dafd0fa0623ca4495237c8c6fa5457c14 (patch)
tree6a0dbc34767db4a49ea9231738fe17dd1df6934a /spec/spec_helper.rb
parent3cfa6c4d1c4ae6ba5e3f22ff8757d1ec9dcd8b68 (diff)
parent6ee1e8d0a4a8cfe02797c1a853bf27af2610ad27 (diff)
Merge remote-tracking branch 'openaustralia_github/configuration_refactor' into develop
Conflicts: config/general.yml-example
Diffstat (limited to 'spec/spec_helper.rb')
-rw-r--r--spec/spec_helper.rb7
1 files changed, 3 insertions, 4 deletions
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
index 6a4d0f2d5..248dff70e 100644
--- a/spec/spec_helper.rb
+++ b/spec/spec_helper.rb
@@ -143,15 +143,14 @@ def validate_as_body(html)
end
def basic_auth_login(request, username = nil, password = nil)
- username = MySociety::Config.get('ADMIN_USERNAME') if username.nil?
- password = MySociety::Config.get('ADMIN_PASSWORD') if password.nil?
+ username = Configuration::admin_username if username.nil?
+ password = Configuration::admin_password if password.nil?
request.env["HTTP_AUTHORIZATION"] = "Basic " + Base64::encode64("#{username}:#{password}")
end
# Monkeypatch! Validate HTML in tests.
-utility_search_path = MySociety::Config.get("UTILITY_SEARCH_PATH", ["/usr/bin", "/usr/local/bin"])
$html_validation_script_found = false
-utility_search_path.each do |d|
+Configuration::utility_search_path.each do |d|
$html_validation_script = File.join(d, "validate")
$html_validation_script_options = ["--charset=utf-8"]
if File.file? $html_validation_script and File.executable? $html_validation_script