Skip to content

Commit 9b67247

Browse files
committed
Fix test suite when mysqld is not installed
The fact being confined, no value was returned when mysqld was not found. Also stub the which method to fix the problem.
1 parent 8089f73 commit 9b67247

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

spec/unit/facter/mysqld_version_spec.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
describe 'mysqld_version' do
99
context 'with value' do
1010
before :each do
11+
Facter::Core::Execution.stubs(:which).with('mysqld').returns('/usr/sbin/mysqld')
1112
Facter::Util::Resolution.stubs(:exec).with('mysqld --no-defaults -V 2>/dev/null').returns('mysqld Ver 5.5.49-37.9 for Linux on x86_64 (Percona Server (GPL), Release 37.9, Revision efa0073)')
1213
end
1314
it {

0 commit comments

Comments
 (0)