From 9c4eb32c22e6bf49d84b6ac1fa4fc5cde5374a7a Mon Sep 17 00:00:00 2001 From: Azul Date: Mon, 25 Feb 2013 13:19:23 +0100 Subject: tests refactored with with_config helper also added test for getting paid certs if free certs are disabled --- core/test/support/with_config_helper.rb | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 core/test/support/with_config_helper.rb (limited to 'core/test/support') diff --git a/core/test/support/with_config_helper.rb b/core/test/support/with_config_helper.rb new file mode 100644 index 0000000..65eb7bc --- /dev/null +++ b/core/test/support/with_config_helper.rb @@ -0,0 +1,16 @@ +module WithConfigHelper + extend ActiveSupport::Concern + + def with_config(options) + old_config = APP_CONFIG.dup + APP_CONFIG.merge! options + yield + ensure + APP_CONFIG.replace old_config + end + +end + +class ActiveSupport::TestCase + include WithConfigHelper +end -- cgit v1.2.3