summaryrefslogtreecommitdiffstats
path: root/spec/unit/node
diff options
context:
space:
mode:
authorJosh Cooper <josh@puppetlabs.com>2011-07-19 14:16:49 -0700
committerJosh Cooper <josh@puppetlabs.com>2011-07-19 14:16:49 -0700
commit21c5929aae899e559e9a813c48424da4fcbec54b (patch)
treefa90342427d0cd41c6aea56df8d89d2deb3def9d /spec/unit/node
parentd69bf48ecae71ff01679bb38cdeebc8f4a8b8b15 (diff)
parent0e4ae653c0628cb0df9ccace98bca4bc7478fb7c (diff)
Merge branch 'feature/master/8268-puppet-agent-windows'
* feature/master/8268-puppet-agent-windows: Maint: Fix miscellaneous tests Maint: Don't test for extended signals on Windows Maint: Tagged spec tests that are known to fail on Windows Fix tests with "relative" paths on Windows (#8268) Require windows drive letters in absolute file paths (#8489) Consistently use File::PATH_SEPARATOR
Diffstat (limited to 'spec/unit/node')
-rwxr-xr-xspec/unit/node/environment_spec.rb13
1 files changed, 9 insertions, 4 deletions
diff --git a/spec/unit/node/environment_spec.rb b/spec/unit/node/environment_spec.rb
index d1badfa3a..144e82e0c 100755
--- a/spec/unit/node/environment_spec.rb
+++ b/spec/unit/node/environment_spec.rb
@@ -144,13 +144,18 @@ describe Puppet::Node::Environment do
end
describe "when validating modulepath or manifestdir directories" do
+ before :each do
+ @path_one = make_absolute('/one')
+ @path_two = make_absolute('/two')
+ end
+
it "should not return non-directories" do
env = Puppet::Node::Environment.new("testing")
- FileTest.expects(:directory?).with("/one").returns true
- FileTest.expects(:directory?).with("/two").returns false
+ FileTest.expects(:directory?).with(@path_one).returns true
+ FileTest.expects(:directory?).with(@path_two).returns false
- env.validate_dirs(%w{/one /two}).should == %w{/one}
+ env.validate_dirs([@path_one, @path_two]).should == [@path_one]
end
it "should use the current working directory to fully-qualify unqualified paths" do
@@ -158,7 +163,7 @@ describe Puppet::Node::Environment do
env = Puppet::Node::Environment.new("testing")
two = File.join(Dir.getwd, "two")
- env.validate_dirs(%w{/one two}).should == ["/one", two]
+ env.validate_dirs([@path_one, 'two']).should == [@path_one, two]
end
end