diff options
| author | Nick Lewis <nick@puppetlabs.com> | 2011-01-05 15:54:00 -0800 |
|---|---|---|
| committer | Nick Lewis <nick@puppetlabs.com> | 2011-01-05 15:54:00 -0800 |
| commit | 19eb1e78e115d10bfb822e510213e4fab9cd2599 (patch) | |
| tree | d5068dfd7a3890c7b5961779c87681b930cf3144 /spec/unit/network | |
| parent | cc1f2b39a65e8b74c8e59a2bf7d8f47a35985ee4 (diff) | |
| parent | 83ac3e789ddc8dbf40c93460032474870fb16c54 (diff) | |
Merge branch '2.6.next' into 2.6.x
Diffstat (limited to 'spec/unit/network')
| -rwxr-xr-x | spec/unit/network/formats_spec.rb | 7 | ||||
| -rw-r--r-- | spec/unit/network/http/compression_spec.rb | 4 | ||||
| -rwxr-xr-x | spec/unit/network/http/mongrel/rest_spec.rb | 3 | ||||
| -rwxr-xr-x | spec/unit/network/http/mongrel_spec.rb | 12 | ||||
| -rwxr-xr-x | spec/unit/network/http/rack/rest_spec.rb | 4 | ||||
| -rwxr-xr-x | spec/unit/network/http/rack/xmlrpc_spec.rb | 4 | ||||
| -rwxr-xr-x | spec/unit/network/http/rack_spec.rb | 4 |
7 files changed, 10 insertions, 28 deletions
diff --git a/spec/unit/network/formats_spec.rb b/spec/unit/network/formats_spec.rb index 7c8e7b1f4..2c58a0534 100755 --- a/spec/unit/network/formats_spec.rb +++ b/spec/unit/network/formats_spec.rb @@ -69,9 +69,8 @@ describe "Puppet Network Format" do end end - describe "base64 compressed yaml" do + describe "base64 compressed yaml", :if => Puppet.features.zlib? do yaml = Puppet::Network::FormatHandler.format(:b64_zlib_yaml) - confine "We must have zlib" => Puppet.features.zlib? before do @yaml = Puppet::Network::FormatHandler.format(:b64_zlib_yaml) @@ -265,9 +264,7 @@ describe "Puppet Network Format" do Puppet::Network::FormatHandler.format(:pson).should_not be_nil end - describe "pson" do - confine "Missing 'pson' library" => Puppet.features.pson? - + describe "pson", :if => Puppet.features.pson? do before do @pson = Puppet::Network::FormatHandler.format(:pson) end diff --git a/spec/unit/network/http/compression_spec.rb b/spec/unit/network/http/compression_spec.rb index b46941f46..c5bbbb064 100644 --- a/spec/unit/network/http/compression_spec.rb +++ b/spec/unit/network/http/compression_spec.rb @@ -37,9 +37,7 @@ describe "http compression" do end end - describe "when zlib is available" do - confine "Zlib is missing" => Puppet.features.zlib? - + describe "when zlib is available", :if => Puppet.features.zlib? do before(:each) do Puppet.features.stubs(:zlib?).returns true diff --git a/spec/unit/network/http/mongrel/rest_spec.rb b/spec/unit/network/http/mongrel/rest_spec.rb index 92a81a10b..fb24521d5 100755 --- a/spec/unit/network/http/mongrel/rest_spec.rb +++ b/spec/unit/network/http/mongrel/rest_spec.rb @@ -4,8 +4,7 @@ require File.dirname(__FILE__) + '/../../../../spec_helper' require 'puppet/network/http' -describe "Puppet::Network::HTTP::MongrelREST" do - confine "Mongrel is not available" => Puppet.features.mongrel? +describe "Puppet::Network::HTTP::MongrelREST", :if => Puppet.features.mongrel? do before do require 'puppet/network/http/mongrel/rest' end diff --git a/spec/unit/network/http/mongrel_spec.rb b/spec/unit/network/http/mongrel_spec.rb index ac3d72bae..1e24be0c6 100755 --- a/spec/unit/network/http/mongrel_spec.rb +++ b/spec/unit/network/http/mongrel_spec.rb @@ -6,9 +6,7 @@ require File.dirname(__FILE__) + '/../../../spec_helper' require 'puppet/network/http' -describe "Puppet::Network::HTTP::Mongrel", "after initializing" do - confine "Mongrel is not available" => Puppet.features.mongrel? - +describe "Puppet::Network::HTTP::Mongrel", "after initializing", :if => Puppet.features.mongrel? do it "should not be listening" do require 'puppet/network/http/mongrel' @@ -16,9 +14,7 @@ describe "Puppet::Network::HTTP::Mongrel", "after initializing" do end end -describe "Puppet::Network::HTTP::Mongrel", "when turning on listening" do - confine "Mongrel is not available" => Puppet.features.mongrel? - +describe "Puppet::Network::HTTP::Mongrel", "when turning on listening", :if => Puppet.features.mongrel? do before do require 'puppet/network/http/mongrel' @@ -100,9 +96,7 @@ describe "Puppet::Network::HTTP::Mongrel", "when turning on listening" do end end -describe "Puppet::Network::HTTP::Mongrel", "when turning off listening" do - confine "Mongrel is not available" => Puppet.features.mongrel? - +describe "Puppet::Network::HTTP::Mongrel", "when turning off listening", :if => Puppet.features.mongrel? do before do @mock_mongrel = mock('mongrel httpserver') @mock_mongrel.stubs(:run) diff --git a/spec/unit/network/http/rack/rest_spec.rb b/spec/unit/network/http/rack/rest_spec.rb index 96cf84c37..3eed4a2cb 100755 --- a/spec/unit/network/http/rack/rest_spec.rb +++ b/spec/unit/network/http/rack/rest_spec.rb @@ -4,9 +4,7 @@ require File.dirname(__FILE__) + '/../../../../spec_helper' require 'puppet/network/http/rack' if Puppet.features.rack? require 'puppet/network/http/rack/rest' -describe "Puppet::Network::HTTP::RackREST" do - confine "Rack is not available" => Puppet.features.rack? - +describe "Puppet::Network::HTTP::RackREST", :if => Puppet.features.rack? do it "should include the Puppet::Network::HTTP::Handler module" do Puppet::Network::HTTP::RackREST.ancestors.should be_include(Puppet::Network::HTTP::Handler) end diff --git a/spec/unit/network/http/rack/xmlrpc_spec.rb b/spec/unit/network/http/rack/xmlrpc_spec.rb index 870438f2c..e6411524e 100755 --- a/spec/unit/network/http/rack/xmlrpc_spec.rb +++ b/spec/unit/network/http/rack/xmlrpc_spec.rb @@ -5,9 +5,7 @@ require 'puppet/network/handler' require 'puppet/network/http/rack' if Puppet.features.rack? require 'puppet/network/http/rack/xmlrpc' if Puppet.features.rack? -describe "Puppet::Network::HTTP::RackXMLRPC" do - confine "Rack is not available" => Puppet.features.rack? - +describe "Puppet::Network::HTTP::RackXMLRPC", :if => Puppet.features.rack? do describe "when initializing" do it "should create an Puppet::Network::XMLRPCServer" do Puppet::Network::XMLRPCServer.expects(:new).returns stub_everything diff --git a/spec/unit/network/http/rack_spec.rb b/spec/unit/network/http/rack_spec.rb index 8be9ccb50..434294ce8 100755 --- a/spec/unit/network/http/rack_spec.rb +++ b/spec/unit/network/http/rack_spec.rb @@ -4,9 +4,7 @@ require File.dirname(__FILE__) + '/../../../spec_helper' require 'puppet/network/handler' require 'puppet/network/http/rack' if Puppet.features.rack? -describe "Puppet::Network::HTTP::Rack" do - confine "Rack is not available" => Puppet.features.rack? - +describe "Puppet::Network::HTTP::Rack", :if => Puppet.features.rack? do describe "while initializing" do it "should require a protocol specification" do |
