summaryrefslogtreecommitdiffstats
path: root/spec/lib
diff options
context:
space:
mode:
authorLuke Kanies <luke@madstop.com>2007-11-26 22:48:44 -0600
committerLuke Kanies <luke@madstop.com>2007-11-26 22:48:44 -0600
commit2d19ee2a0452baf75a23093e6fea3b743a5f0a69 (patch)
tree432ad1cce58865af122e8ff7d7ba46497430fdec /spec/lib
parentc3dde683158863ae764684c5b7d958e39e905874 (diff)
downloadpuppet-2d19ee2a0452baf75a23093e6fea3b743a5f0a69.tar.gz
puppet-2d19ee2a0452baf75a23093e6fea3b743a5f0a69.tar.xz
puppet-2d19ee2a0452baf75a23093e6fea3b743a5f0a69.zip
Fixing #920 -- I have replaced the existing mount test with an
rspec version. It's not perfect, in that it only tests the :ensure state, but that's where 90% of the behaviour is.
Diffstat (limited to 'spec/lib')
-rw-r--r--spec/lib/monkey_patches/add_confine_and_runnable_to_rspec_dsl.rb9
1 files changed, 5 insertions, 4 deletions
diff --git a/spec/lib/monkey_patches/add_confine_and_runnable_to_rspec_dsl.rb b/spec/lib/monkey_patches/add_confine_and_runnable_to_rspec_dsl.rb
index a2467eac8..bfa2a0c3c 100644
--- a/spec/lib/monkey_patches/add_confine_and_runnable_to_rspec_dsl.rb
+++ b/spec/lib/monkey_patches/add_confine_and_runnable_to_rspec_dsl.rb
@@ -1,7 +1,8 @@
dir = File.expand_path(File.dirname(__FILE__))
-$LOAD_PATH.unshift("#{dir}/../../lib")
-$LOAD_PATH.unshift("#{dir}/../../../lib")
-$LOAD_PATH.unshift("#{dir}/../../../test/lib") # Add the old test dir, so that we can still find our local mocha and spec
+[ "#{dir}/../../lib", "#{dir}/../../../lib", "#{dir}/../../../test/lib"].each do |dir|
+ fulldir = File.expand_path(dir)
+ $LOAD_PATH.unshift(fulldir) unless $LOAD_PATH.include?(fulldir)
+end
require 'spec'
require 'puppettest'
@@ -17,7 +18,7 @@ module Spec
behaviour.run(@options.reporter, @options.dry_run, @options.reverse, @options.timeout)
end
end
- end
+ end
end
end