summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesse Wolfe <jes5199@gmail.com>2010-07-01 15:17:01 -0700
committerMarkus Roberts <Markus@reality.com>2010-07-02 12:31:52 -0700
commitb389392c23032090c80cfe42ee19c2d8d45dff64 (patch)
tree051d8e997c8fc3c4670517ba7ffa86ef401b5348
parent3304068fe96df86c3616f3f441595811d71162b0 (diff)
downloadpuppet-b389392c23032090c80cfe42ee19c2d8d45dff64.tar.gz
puppet-b389392c23032090c80cfe42ee19c2d8d45dff64.tar.xz
puppet-b389392c23032090c80cfe42ee19c2d8d45dff64.zip
maint: spec_helper should only get loaded once
Added a C-style if-defined? guard to spec_helper.rb to make sure that it only gets evaluated once. (The file is getting loaded multiple times because ruby gets confused by relative paths in `require` statements)
-rw-r--r--spec/spec_helper.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
index 0ea24bb77..e1b65e6de 100644
--- a/spec/spec_helper.rb
+++ b/spec/spec_helper.rb
@@ -1,3 +1,6 @@
+unless defined? SPEC_HELPER_IS_LOADED
+SPEC_HELPER_IS_LOADED = 1
+
dir = File.expand_path(File.dirname(__FILE__))
$LOAD_PATH.unshift("#{dir}/")
@@ -75,3 +78,5 @@ Puppet[:vardir] = "/dev/null"
class Object
alias :must :should
end
+
+end