Permalink
Browse files

Stub the $root_home fact

  • Loading branch information...
1 parent bdb4160 commit 24444ce119331f47fd39628c26d1c6e7081959fd @hunner hunner committed Aug 30, 2012
Showing with 2 additions and 6 deletions.
  1. +2 −6 spec/unit/puppet/provider/database_grant/mysql_spec.rb
@@ -6,18 +6,14 @@
end
provider_class = Puppet::Type.type(:database_grant).provider(:mysql)
describe provider_class do
- root_home = '/some/root/home'
- #root_home = ''
-
- let :facts do
- { :root_home => root_home }
- end
+ let(:root_home) { '/some/root/home' }
before :each do
@resource = Puppet::Type::Database_grant.new(
{ :privileges => 'all', :provider => 'mysql', :name => 'user@host'}
)
@provider = provider_class.new(@resource)
+ Facter.stubs(:value).with(:root_home).returns(root_home)
end
it 'should query privilegess from the database' do

0 comments on commit 24444ce

Please sign in to comment.