forked from voxpupuli/puppet-confluence
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
36e7422
commit 1ab44cf
Showing
7 changed files
with
45 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
language: ruby | ||
rvm: | ||
- 1.9.3 | ||
script: "rake spec" | ||
env: | ||
- PUPPET_VERSION=3.4.2 | ||
notifications: | ||
email: | ||
- [email protected] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
require 'rake' | ||
require 'rspec/core/rake_task' | ||
|
||
desc "Run all RSpec code examples" | ||
RSpec::Core::RakeTask.new(:rspec) do |t| | ||
t.rspec_opts = File.read("spec/spec.opts").chomp || "" | ||
end | ||
|
||
SPEC_SUITES = (Dir.entries('spec') - ['.', '..','fixtures']).select {|e| File.directory? "spec/#{e}" } | ||
namespace :rspec do | ||
SPEC_SUITES.each do |suite| | ||
desc "Run #{suite} RSpec code examples" | ||
RSpec::Core::RakeTask.new(suite) do |t| | ||
t.pattern = "spec/#{suite}/**/*_spec.rb" | ||
t.rspec_opts = File.read("spec/spec.opts").chomp || "" | ||
end | ||
end | ||
end | ||
task :default => :rspec | ||
|
||
begin | ||
if Gem::Specification::find_by_name('puppet-lint') | ||
require 'puppet-lint/tasks/puppet-lint' | ||
PuppetLint.configuration.send('disable_80chars') | ||
PuppetLint.configuration.ignore_paths = ["spec/**/*.pp", "vendor/**/*.pp"] | ||
task :default => [:rspec, :lint] | ||
end | ||
rescue Gem::LoadError | ||
end |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../../../manifests |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../../../templates |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |