summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuke Kanies <luke@madstop.com>2008-07-18 15:30:42 -0500
committerJames Turnbull <james@lovedthanlost.net>2008-07-20 14:20:53 +1000
commit238b8d7f0a16eda971409d7423dc1f04cf0e2a34 (patch)
tree62d736f402b0498bdc6650914efb599b558bb99e
parentebb219e496682862ac98d382afe014cf1c763f2f (diff)
downloadpuppet-238b8d7f0a16eda971409d7423dc1f04cf0e2a34.tar.gz
puppet-238b8d7f0a16eda971409d7423dc1f04cf0e2a34.tar.xz
puppet-238b8d7f0a16eda971409d7423dc1f04cf0e2a34.zip
Fixing #1438 -- mongrel and module tests now pass.
Signed-off-by: Luke Kanies <luke@madstop.com>
-rwxr-xr-xspec/unit/module.rb4
-rwxr-xr-xspec/unit/network/http/mongrel.rb4
2 files changed, 6 insertions, 2 deletions
diff --git a/spec/unit/module.rb b/spec/unit/module.rb
index 2dadaa501..e79001ae1 100755
--- a/spec/unit/module.rb
+++ b/spec/unit/module.rb
@@ -143,8 +143,8 @@ describe Puppet::Module, " when searching for manifests when no module is found"
it "should look for files relative to the current directory" do
cwd = Dir.getwd
- Dir.expects(:glob).with("#{cwd}/mymod/init.pp").returns(["#{cwd}/mymod/init.pp"])
- Puppet::Module.find_manifests("mymod/init.pp").should == ["#{cwd}/mymod/init.pp"]
+ Dir.expects(:glob).with("#{cwd}/foobar/init.pp").returns(["#{cwd}/foobar/init.pp"])
+ Puppet::Module.find_manifests("foobar/init.pp").should == ["#{cwd}/foobar/init.pp"]
end
it "should only return files, not directories" do
diff --git a/spec/unit/network/http/mongrel.rb b/spec/unit/network/http/mongrel.rb
index 3a9cfb52f..1732009a8 100755
--- a/spec/unit/network/http/mongrel.rb
+++ b/spec/unit/network/http/mongrel.rb
@@ -10,6 +10,8 @@ describe "Puppet::Network::HTTP::Mongrel", "after initializing" do
confine "Mongrel is not available" => Puppet.features.mongrel?
it "should not be listening" do
+ require 'puppet/network/http/mongrel'
+
Puppet::Network::HTTP::Mongrel.new.should_not be_listening
end
end
@@ -18,6 +20,8 @@ describe "Puppet::Network::HTTP::Mongrel", "when turning on listening" do
confine "Mongrel is not available" => Puppet.features.mongrel?
before do
+ require 'puppet/network/http/mongrel'
+
@server = Puppet::Network::HTTP::Mongrel.new
@mock_mongrel = mock('mongrel')
@mock_mongrel.stubs(:run)