diff options
author | Adam Jacob <adam@hjksolutions.com> | 2008-05-30 09:09:18 -0700 |
---|---|---|
committer | Adam Jacob <adam@hjksolutions.com> | 2008-05-30 09:09:18 -0700 |
commit | d373915a1ac9ea25fcb52ac8468e4670425e3376 (patch) | |
tree | 6273a88ff4c37f42bb817c95db177bc41133c64a /spec | |
parent | 900e8372d8232cf5b2c3489065b4568670e0e487 (diff) | |
download | chef-d373915a1ac9ea25fcb52ac8468e4670425e3376.tar.gz |
Cleaning up openid, starting client support
Diffstat (limited to 'spec')
-rw-r--r-- | spec/unit/file_store_spec.rb | 11 | ||||
-rw-r--r-- | spec/unit/rest_spec.rb | 52 |
2 files changed, 63 insertions, 0 deletions
diff --git a/spec/unit/file_store_spec.rb b/spec/unit/file_store_spec.rb index f2f1070f2d..e7371653f1 100644 --- a/spec/unit/file_store_spec.rb +++ b/spec/unit/file_store_spec.rb @@ -91,5 +91,16 @@ describe Chef::FileStore do File.should_receive(:file?).with("pool").and_return(true) Chef::FileStore.list("node").should eql(["pool"]) end + + it "should let you test whether a key exists for an object type with has_key?" do + Dir.should_receive(:[]).with("/tmp/chef-test/node/**/*").and_return(["pool"]) + File.should_receive(:file?).with("pool").and_return(true) + Chef::FileStore.has_key?("node", "pool").should eql(true) + end + it "should let you test whether a key doesnt exist for an object type with has_key?" do + Dir.should_receive(:[]).with("/tmp/chef-test/node/**/*").and_return(["pool"]) + File.should_receive(:file?).with("pool").and_return(true) + Chef::FileStore.has_key?("node", "snake").should eql(false) + end end
\ No newline at end of file diff --git a/spec/unit/rest_spec.rb b/spec/unit/rest_spec.rb new file mode 100644 index 0000000000..df77d163e9 --- /dev/null +++ b/spec/unit/rest_spec.rb @@ -0,0 +1,52 @@ +# +# Author:: Adam Jacob (<adam@hjksolutions.com>) +# Copyright:: Copyright (c) 2008 HJK Solutions, LLC +# License:: GNU General Public License version 2 or later +# +# This program and entire repository is free software; you can +# redistribute it and/or modify it under the terms of the GNU +# General Public License as published by the Free Software +# Foundation; either version 2 of the License, or any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# + +require File.expand_path(File.join(File.dirname(__FILE__), "..", "spec_helper")) + +describe Chef::REST do + + it "should make a connection to an http server" do + + end + + it "should make a connection to an https server" do + end + + it "should authenticate if given a redirect" do + + end + + it "should GET a URL" do + + end + + it "should PUT to an URL " do + + end + + it "should POST to an URL" do + + end + + it "should DELETE an URL" do + + end + +end
\ No newline at end of file |