Add rspec-puppet generated files

This commit is contained in:
R. Tyler Croy 2012-06-21 11:26:43 -07:00
parent 383220bff6
commit 3af275a341
4 changed files with 13 additions and 14 deletions

7
Rakefile Normal file
View File

@ -0,0 +1,7 @@
require 'rake'
require 'rspec/core/rake_task'
RSpec::Core::RakeTask.new(:spec) do |t|
t.pattern = 'spec/*/*_spec.rb'
end

0
spec/fixtures/manifests/site.pp vendored Normal file
View File

View File

@ -0,0 +1 @@
../../../../manifests

View File

@ -1,17 +1,8 @@
dir = File.expand_path(File.dirname(__FILE__))
$LOAD_PATH.unshift File.join(dir, 'lib')
require 'rspec-puppet'
require 'mocha'
require 'puppet'
require 'rspec'
require 'spec/autorun'
fixture_path = File.expand_path(File.join(__FILE__, '..', 'fixtures'))
Spec::Runner.configure do |config|
config.mock_with :mocha
end
# We need this because the RAL uses 'should' as a method. This
# allows us the same behaviour but with a different method name.
class Object
alias :must :should
RSpec.configure do |c|
c.module_path = File.join(fixture_path, 'modules')
c.manifest_dir = File.join(fixture_path, 'manifests')
end