Skip to content
This repository has been archived by the owner on Dec 14, 2018. It is now read-only.

Commit

Permalink
Added basic rspec files.
Browse files Browse the repository at this point in the history
  • Loading branch information
razor-x committed Jun 14, 2014
1 parent ecab0fa commit 7adaabe
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .rspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
--format documentation
--color
2 changes: 2 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ gem 'chef', '~> 11.12.4'
gem 'berkshelf', '~> 3.1.2'

group :development do
gem 'chef-zero', '~> 2.1.5'

gem 'yard', '~> 0.8.7.4'
gem 'yard-chef', '~> 1.0.0'
gem 'github-markup', '1.2.1'
Expand Down
2 changes: 1 addition & 1 deletion attributes/default.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Cookbook Name:: replace_name
# Cookbook Name:: replace_cookbook_name
# Attributes:: default
#
# Copyright replace_yyyy replace_name_of_copyright_owner
Expand Down
4 changes: 3 additions & 1 deletion recipes/default.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Cookbook Name:: replace_name
# Cookbook Name:: replace_cookbook_name
# Recipe:: default
#
# Copyright replace_yyyy replace_name_of_copyright_owner
Expand All @@ -16,3 +16,5 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#

log 'replace_this'
4 changes: 4 additions & 0 deletions spec/.rubocop.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
inherit_from: ../.rubocop.yml

Style/StringLiterals:
Enabled: false
9 changes: 9 additions & 0 deletions spec/default_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
require 'spec_helper'

describe 'replace_cookbook_name::default' do
let(:chef_run) { ChefSpec::Runner.new.converge(described_recipe) }

it "replace_does_something" do
expect(chef_run).to write_log 'replace_this'
end
end
3 changes: 3 additions & 0 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
require 'chefspec'
require 'chefspec/berkshelf'
require 'chefspec/server'

0 comments on commit 7adaabe

Please sign in to comment.