We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 55d27b8 commit dcfa654Copy full SHA for dcfa654
1 file changed
chef/spec/unit/couchdb_spec.rb
@@ -91,11 +91,17 @@ def do_create_db
91
@mock_rest.stub!(:get_rest).and_return(@mock_design)
92
@mock_rest.stub!(:put_rest).and_return(true)
93
Chef::REST.stub!(:new).and_return(@mock_rest)
94
+ @couchdb = Chef::CouchDB.new
95
+ @couchdb.stub!(:create_db).and_return(true)
96
end
97
98
def do_create_design_document
- couchdb = Chef::CouchDB.new
- couchdb.create_design_document("bob", @mock_data)
99
+ @couchdb.create_design_document("bob", @mock_data)
100
+ end
101
+
102
+ it "should create the database if it does not exist" do
103
+ @couchdb.should_receive(:create_db).and_return(true)
104
+ do_create_design_document
105
106
107
it "should fetch the existing design document" do
0 commit comments