Skip to content

Commit e5e01c4

Browse files
author
Gary Larizza
committed
Merge pull request #1 from hunner/add_spec_helper
Add spec helper
2 parents 802ba51 + aba70ab commit e5e01c4

File tree

10 files changed

+20
-31
lines changed

10 files changed

+20
-31
lines changed

.fixtures.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
fixtures:
2+
repositories:
3+
concat: "git://github.com/ripienaar/puppet-concat.git"
4+
symlinks:
5+
haproxy: "#{source_dir}"

.gitmodules

Lines changed: 0 additions & 3 deletions
This file was deleted.

README.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,9 @@ requests accepted!
77

88
## Hacking
99

10-
After cloning the repository, execute `git submodule update --init` to pull in
11-
any dependencies needed to test the module locally.
10+
After cloning the repository:
1211

13-
1. `git submodule update --init`
12+
1. `gem install puppetlabs_spec_helper`
1413
1. `rake spec` # To run the tests
1514
1. Hack Hack Hack # Adding tests hopefully!
1615
1. Commit and send a pull request!

Rakefile

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1 @@
1-
require 'rake'
2-
require 'puppet-lint/tasks/puppet-lint'
3-
require 'rspec/core/rake_task'
4-
5-
RSpec::Core::RakeTask.new(:spec) do |t|
6-
t.rspec_opts = '-c'
7-
t.pattern = 'spec/*/*_spec.rb'
8-
end
1+
require 'puppetlabs_spec_helper/rake_tasks'

spec/classes/haproxy_spec.rb

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,10 @@
44

55
context 'on Redhat family operatingsystems' do
66
let(:facts) do
7-
{ :osfamily => 'Redhat' }
7+
{
8+
:osfamily => 'Redhat',
9+
:concat_basedir => '/dne'
10+
}
811
end
912
it { should include_class('concat::setup') }
1013

@@ -58,4 +61,4 @@
5861
}.to raise_error(Puppet::Error, /operating system is not supported with the haproxy module/)
5962
end
6063
end
61-
end
64+
end

spec/fixtures/manifests/site.pp

Whitespace-only changes.

spec/fixtures/modules/concat

Lines changed: 0 additions & 1 deletion
This file was deleted.

spec/fixtures/modules/haproxy

Lines changed: 0 additions & 1 deletion
This file was deleted.

spec/spec.opts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
--format
2+
s
3+
--colour
4+
--loadby
5+
mtime
6+
--backtrace

spec/spec_helper.rb

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1 @@
1-
require 'puppet'
2-
require 'rubygems'
3-
require 'rspec-puppet'
4-
5-
fixture_path = File.expand_path(File.join(__FILE__, '..', 'fixtures'))
6-
RSpec.configure do |c|
7-
c.module_path = File.join(fixture_path, 'modules')
8-
c.manifest_dir = File.join(fixture_path, 'manifests')
9-
end
10-
11-
class Object
12-
alias :must :should
13-
end
1+
require 'puppetlabs_spec_helper/module_spec_helper'

0 commit comments

Comments
 (0)