Skip to content

Commit 50ff0a9

Browse files
committed
Merge pull request #524 from blkperl/be_truthy_rspec
RSpec renamed be_true to be_truthy in 3.0
2 parents 6769677 + 669466c commit 50ff0a9

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

spec/unit/puppet/provider/database_user/mysql_spec.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,15 +52,15 @@
5252
subject.expects(:mysql).with([defaults_file, 'mysql', '-e', "grant usage on *.* to 'joe'@'localhost' identified by PASSWORD
5353
'*6C8989366EAF75BB670AD8EA7A7FC1176A95CEF4' with max_user_connections 10"])
5454
@provider.expects(:exists?).returns(true)
55-
@provider.create.should be_true
55+
@provider.create.should be_truthy
5656
end
5757
end
5858

5959
describe 'destroy' do
6060
it 'removes a user if present' do
6161
subject.expects(:mysql).with([defaults_file, 'mysql', '-e', "drop user 'joe'@'localhost'"])
6262
@provider.expects(:exists?).returns(false)
63-
@provider.destroy.should be_true
63+
@provider.destroy.should be_truthy
6464
end
6565
end
6666

@@ -98,7 +98,7 @@
9898
describe 'exists?' do
9999
it 'checks if user exists' do
100100
subject.expects(:mysql).with([defaults_file, 'mysql', '-NBe', "select '1' from mysql.user where CONCAT(user, '@', host) = 'joe@localhost'"]).returns('1')
101-
@provider.exists?.should be_true
101+
@provider.exists?.should be_truthy
102102
end
103103
end
104104

spec/unit/puppet/provider/mysql_database/mysql_spec.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,21 +58,21 @@
5858
it 'makes a database' do
5959
provider.expects(:mysql).with([defaults_file, '-NBe', "create database if not exists `#{resource[:name]}` character set #{resource[:charset]} collate #{resource[:collate]}"])
6060
provider.expects(:exists?).returns(true)
61-
provider.create.should be_true
61+
provider.create.should be_truthy
6262
end
6363
end
6464

6565
describe 'destroy' do
6666
it 'removes a database if present' do
6767
provider.expects(:mysql).with([defaults_file, '-NBe', "drop database `#{resource[:name]}`"])
6868
provider.expects(:exists?).returns(false)
69-
provider.destroy.should be_true
69+
provider.destroy.should be_truthy
7070
end
7171
end
7272

7373
describe 'exists?' do
7474
it 'checks if database exists' do
75-
instance.exists?.should be_true
75+
instance.exists?.should be_truthy
7676
end
7777
end
7878

spec/unit/puppet/provider/mysql_user/mysql_spec.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,21 +65,21 @@
6565
it 'makes a user' do
6666
provider.expects(:mysql).with([defaults_file, '-e', "GRANT USAGE ON *.* TO 'joe'@'localhost' IDENTIFIED BY PASSWORD '*6C8989366EAF75BB670AD8EA7A7FC1176A95CEF4' WITH MAX_USER_CONNECTIONS 10 MAX_CONNECTIONS_PER_HOUR 10 MAX_QUERIES_PER_HOUR 10 MAX_UPDATES_PER_HOUR 10"])
6767
provider.expects(:exists?).returns(true)
68-
provider.create.should be_true
68+
provider.create.should be_truthy
6969
end
7070
end
7171

7272
describe 'destroy' do
7373
it 'removes a user if present' do
7474
provider.expects(:mysql).with([defaults_file, '-e', "DROP USER 'joe'@'localhost'"])
7575
provider.expects(:exists?).returns(false)
76-
provider.destroy.should be_true
76+
provider.destroy.should be_truthy
7777
end
7878
end
7979

8080
describe 'exists?' do
8181
it 'checks if user exists' do
82-
instance.exists?.should be_true
82+
instance.exists?.should be_truthy
8383
end
8484
end
8585

0 commit comments

Comments
 (0)