From a571df4c79b8d2bed2aeb05651e6365833abfb1d Mon Sep 17 00:00:00 2001 From: Srinath M Date: Mon, 16 Dec 2013 09:59:43 -0500 Subject: [PATCH] Fixed testing for creating a DB with the [if not exists] clause --- spec/unit/puppet/provider/mysql_database/mysql_spec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/unit/puppet/provider/mysql_database/mysql_spec.rb b/spec/unit/puppet/provider/mysql_database/mysql_spec.rb index 4daba63..1ffc8de 100644 --- a/spec/unit/puppet/provider/mysql_database/mysql_spec.rb +++ b/spec/unit/puppet/provider/mysql_database/mysql_spec.rb @@ -56,7 +56,7 @@ test describe 'create' do it 'makes a database' do - provider.expects(:mysql).with([defaults_file, '-NBe', "create database `#{resource[:name]}` character set #{resource[:charset]} collate #{resource[:collate]}"]) + provider.expects(:mysql).with([defaults_file, '-NBe', "create database if not exists `#{resource[:name]}` character set #{resource[:charset]} collate #{resource[:collate]}"]) provider.expects(:exists?).returns(true) provider.create.should be_true end