Skip to content

Commit

Permalink
Merge branch 'CHEF-2209'
Browse files Browse the repository at this point in the history
  • Loading branch information
danielsdeleo committed Apr 10, 2011
2 parents d96f83c + 3f85c5e commit 46c2515
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 6 deletions.
1 change: 1 addition & 0 deletions chef-server-api/config/init.rb
Expand Up @@ -65,6 +65,7 @@

unless Merb::Config.environment == "test"
# create the couch design docs for nodes, roles, and databags
Chef::CouchDB.new.create_db
Chef::CouchDB.new.create_id_map
Chef::Node.create_design_document
Chef::Role.create_design_document
Expand Down
1 change: 0 additions & 1 deletion chef/lib/chef/couchdb.rb
Expand Up @@ -78,7 +78,6 @@ def create_db
end

def create_design_document(name, data)
create_db
to_update = true
begin
old_doc = @rest.get_rest("#{couchdb_database}/_design/#{name}")
Expand Down
5 changes: 0 additions & 5 deletions chef/spec/unit/couchdb_spec.rb
Expand Up @@ -101,11 +101,6 @@ def do_create_design_document
@couchdb.create_design_document("bob", @mock_data)
end

it "should create the database if it does not exist" do
@couchdb.should_receive(:create_db).and_return(true)
do_create_design_document
end

it "should fetch the existing design document" do
@rest.should_receive(:get_rest).with("chef/_design/bob")
do_create_design_document
Expand Down

0 comments on commit 46c2515

Please sign in to comment.