test_utils: add with_custom_locale test

This commit is contained in:
Dominyk Tiller
2016-08-02 03:50:49 +01:00
parent de4016e049
commit 774eefa8ae
+8
View File
@@ -78,6 +78,14 @@ class UtilTests < Homebrew::TestCase
end
end
def test_with_custom_locale
ENV["LC_ALL"] = "en_US.UTF-8"
with_custom_locale("C") do
assert_equal "C", ENV["LC_ALL"]
end
assert_equal "en_US.UTF-8", ENV["LC_ALL"]
end
def test_run_as_not_developer
ENV["HOMEBREW_DEVELOPER"] = "foo"
run_as_not_developer do