Skip to content

Commit

Permalink
Merge pull request #426 from legal90/fix-tests
Browse files Browse the repository at this point in the history
Update unit tests configuration
  • Loading branch information
johnbellone authored Apr 25, 2017
2 parents da7f406 + 0324cfa commit f01a12d
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 30 deletions.
9 changes: 9 additions & 0 deletions .delivery/project.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[local_phases]
unit = "bundle exec rspec test/spec/"
lint = 'cookstyle --display-cop-names --extra-details'
syntax = "foodcritic ."
provision = "echo skipping"
deploy = "echo skipping"
smoke = "echo skipping"
functional = "echo skipping"
cleanup = "echo skipping"
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ matrix:
include:
- script:
- bundle install
- bundle exec rake
- chef exec delivery local all
env: UNIT_AND_LINT=1

notifications:
Expand Down
8 changes: 8 additions & 0 deletions Berksfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
source 'https://supermarket.chef.io'

metadata

group :integration do
cookbook 'selinux'
cookbook 'consul_spec', path: 'test/fixtures/cookbooks/consul_spec'
end
36 changes: 11 additions & 25 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,28 +1,14 @@
# This gemfile provides additional gems for testing and releasing this cookbook
# It is meant to be installed on top of ChefDK which provides the majority
# of the necessary gems for testing this cookbook
#
# Run 'chef exec bundle install' to install these dependencies

source 'https://rubygems.org'

gem 'berkshelf'
gem 'poise', '~> 2.2'
gem 'poise-service', '~> 1.0'
gem 'poise-boiler'
gem 'chef-sugar'

group :lint do
gem 'cookstyle', '~> 1.0'
gem 'rubocop'
gem 'foodcritic'
end

group :unit, :integration do
gem 'chef-dk', '~> 1.0'
gem 'chefspec'
gem 'rubyzip'
gem 'serverspec'
gem 'rb-readline'
end

group :development do
gem 'awesome_print'
gem 'stove'
end

group :doc do
gem 'yard'
end
gem 'poise-service', '~> 1.0'
gem 'rb-readline'
gem 'stove'
2 changes: 2 additions & 0 deletions metadata.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,5 @@

source_url 'https://github.com/johnbellone/consul-cookbook' if respond_to?(:source_url)
issues_url 'https://github.com/johnbellone/consul-cookbook/issues' if respond_to?(:issues_url)

chef_version '>= 12.1' if respond_to?(:chef_version)
5 changes: 1 addition & 4 deletions test/spec/spec_helper.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
require 'chefspec'
require 'chefspec/policyfile'
require 'chefspec/berkshelf'
require 'poise_boiler/spec_helper'
require_relative '../../libraries/helpers'

require 'codeclimate-test-reporter'
CodeClimate::TestReporter.start

0 comments on commit f01a12d

Please sign in to comment.