Skip to content

Commit 24444ce

Browse files
committed
Stub the $root_home fact
1 parent bdb4160 commit 24444ce

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

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

+2-6
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,14 @@
66
end
77
provider_class = Puppet::Type.type(:database_grant).provider(:mysql)
88
describe provider_class do
9-
root_home = '/some/root/home'
10-
#root_home = ''
11-
12-
let :facts do
13-
{ :root_home => root_home }
14-
end
9+
let(:root_home) { '/some/root/home' }
1510

1611
before :each do
1712
@resource = Puppet::Type::Database_grant.new(
1813
{ :privileges => 'all', :provider => 'mysql', :name => 'user@host'}
1914
)
2015
@provider = provider_class.new(@resource)
16+
Facter.stubs(:value).with(:root_home).returns(root_home)
2117
end
2218

2319
it 'should query privilegess from the database' do

0 commit comments

Comments
 (0)