aboutsummaryrefslogtreecommitdiffstats
path: root/spec/spec_helper.rb
diff options
context:
space:
mode:
authorLouise Crow <louise.crow@gmail.com>2012-10-17 14:04:58 +0100
committerLouise Crow <louise.crow@gmail.com>2012-10-17 14:04:58 +0100
commita4927fc05a710cee6217d8a40ce925d5f894fd8f (patch)
tree83909e1d903afbf49d50182af79a679442632975 /spec/spec_helper.rb
parentcc27fe66a13fe1504711c64ce5530a1c178e907d (diff)
parentcc7bc36d5748c9baa0cfd8e44395923cc5792f32 (diff)
Merge branch 'release/0.6.7' into wdtk
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