Skip to content

Commit

Permalink
adding minitest bits
Browse files Browse the repository at this point in the history
  • Loading branch information
Sean OMeara committed Jul 31, 2013
1 parent 14288bf commit 2ec93da
Show file tree
Hide file tree
Showing 7 changed files with 71 additions and 1 deletion.
27 changes: 27 additions & 0 deletions .kitchen.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
driver_plugin: vagrant
driver_config:
require_chef_omnibus: true

platforms:
- name: ubuntu-12.04
driver_config:
box: opscode-ubuntu-12.04
box_url: https://opscode-vm.s3.amazonaws.com/vagrant/opscode_ubuntu-12.04_provisionerless.box
- name: ubuntu-10.04
driver_config:
box: opscode-ubuntu-10.04
box_url: https://opscode-vm.s3.amazonaws.com/vagrant/opscode_ubuntu-10.04_provisionerless.box
- name: centos-6.4
driver_config:
box: opscode-centos-6.4
box_url: https://opscode-vm.s3.amazonaws.com/vagrant/opscode_centos-6.4_provisionerless.box
- name: centos-5.9
driver_config:
box: opscode-centos-5.9
box_url: https://opscode-vm.s3.amazonaws.com/vagrant/opscode_centos-5.9_provisionerless.box

suites:
- name: default
run_list: ["recipe[line]"]
attributes: {}
5 changes: 5 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
source 'https://rubygems.org'

gem 'berkshelf'
gem 'test-kitchen', :group => :integration
gem 'kitchen-vagrant', :group => :integration
12 changes: 12 additions & 0 deletions Thorfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# encoding: utf-8

require 'bundler'
require 'bundler/setup'
require 'berkshelf/thor'

begin
require 'kitchen/thor_tasks'
Kitchen::ThorTasks.new
rescue LoadError
puts ">>>>> Kitchen gem not loaded, omitting tasks" unless ENV['CI']
end
2 changes: 1 addition & 1 deletion Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Vagrant::Config.run do |config|
# via the IP. Host-only networks can talk to the host machine as well as
# any other machines on the same network, but cannot be accessed (through this
# network interface) by any external networks.
config.vm.network :hostonly, "10.10.10.3"
config.vm.network :hostonly, "33.33.33.10"

# Assign this VM to a bridged network, allowing you to connect directly to a
# network using the host's network device. This makes the VM appear as another
Expand Down
11 changes: 11 additions & 0 deletions files/default/tests/minitest/default_test.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
require File.expand_path('../support/helpers', __FILE__)

describe 'line::default' do

include Helpers::Line

# Example spec tests can be found at http://git.io/Fahwsw
it 'runs no tests by default' do
end

end
7 changes: 7 additions & 0 deletions files/default/tests/minitest/support/helpers.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
module Helpers
module Line
include MiniTest::Chef::Assertions
include MiniTest::Chef::Context
include MiniTest::Chef::Resources
end
end
8 changes: 8 additions & 0 deletions recipes/default.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#
# Cookbook Name:: line
# Recipe:: default
#
# Copyright (C) 2013 YOUR_COPYRIGHT
#
# All rights reserved - Do Not Redistribute
#

0 comments on commit 2ec93da

Please sign in to comment.