Skip to content

Commit

Permalink
Stub the $root_home fact
Browse files Browse the repository at this point in the history
  • Loading branch information
hunner committed Oct 9, 2012
1 parent bdb4160 commit 24444ce
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions spec/unit/puppet/provider/database_grant/mysql_spec.rb
Expand Up @@ -6,18 +6,14 @@
end end
provider_class = Puppet::Type.type(:database_grant).provider(:mysql) provider_class = Puppet::Type.type(:database_grant).provider(:mysql)
describe provider_class do describe provider_class do
root_home = '/some/root/home' let(:root_home) { '/some/root/home' }
#root_home = ''

let :facts do
{ :root_home => root_home }
end


before :each do before :each do
@resource = Puppet::Type::Database_grant.new( @resource = Puppet::Type::Database_grant.new(
{ :privileges => 'all', :provider => 'mysql', :name => 'user@host'} { :privileges => 'all', :provider => 'mysql', :name => 'user@host'}
) )
@provider = provider_class.new(@resource) @provider = provider_class.new(@resource)
Facter.stubs(:value).with(:root_home).returns(root_home)
end end


it 'should query privilegess from the database' do it 'should query privilegess from the database' do
Expand Down

0 comments on commit 24444ce

Please sign in to comment.