meez 0.0.5 → 0.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/meez/meez.rb +9 -11
- metadata +1 -1
data/lib/meez/meez.rb
CHANGED
@@ -88,8 +88,8 @@ suites:
|
|
88
88
|
def self.init_chefspec(cookbook_name, options)
|
89
89
|
puts '* Initializing Chef Spec'
|
90
90
|
path = File.join(options[:path], cookbook_name)
|
91
|
-
spec_path = File.join(path, 'spec')
|
92
|
-
|
91
|
+
spec_path = File.join(path, 'test', 'unit', 'spec')
|
92
|
+
FileUtils.mkdir_p(spec_path)
|
93
93
|
puts "\tCreating #{File.join(spec_path, 'spec_helper.rb')}"
|
94
94
|
|
95
95
|
File.open(File.join(spec_path, 'spec_helper.rb'), 'w') do |file|
|
@@ -97,6 +97,7 @@ suites:
|
|
97
97
|
# Encoding: utf-8
|
98
98
|
require 'chefspec'
|
99
99
|
require 'chefspec/berkshelf'
|
100
|
+
require 'chef/application'
|
100
101
|
|
101
102
|
::LOG_LEVEL = :fatal
|
102
103
|
::UBUNTU_OPTS = {
|
@@ -123,16 +124,13 @@ at_exit { ChefSpec::Coverage.report! }
|
|
123
124
|
|
124
125
|
require_relative 'spec_helper'
|
125
126
|
|
126
|
-
describe '
|
127
|
+
describe 'logstash::default' do
|
128
|
+
before { stub_resources }
|
127
129
|
describe 'ubuntu' do
|
128
|
-
|
129
|
-
@chef_run = ::ChefSpec::Runner.new(::UBUNTU_OPTS)
|
130
|
-
stub_resources
|
131
|
-
@chef_run.converge '#{cookbook_name}::default'
|
132
|
-
end
|
130
|
+
let(:chef_run) { ChefSpec::Runner.new.converge(described_recipe) }
|
133
131
|
|
134
|
-
it 'writes some
|
135
|
-
pending '
|
132
|
+
it 'writes some chefspec code' do
|
133
|
+
pending 'todo'
|
136
134
|
end
|
137
135
|
|
138
136
|
end
|
@@ -143,7 +141,7 @@ end
|
|
143
141
|
|
144
142
|
puts "\tAppend Gemfile"
|
145
143
|
File.open(File.join(path, 'Gemfile'), 'a') { |f| f.write("gem 'chefspec', '~> 3.1.4'\n") }
|
146
|
-
File.open(File.join(path, 'Strainerfile'), 'a') { |f| f.write("chefspec: bundle exec rspec $SANDBOX/$COOKBOOK/spec\n") }
|
144
|
+
File.open(File.join(path, 'Strainerfile'), 'a') { |f| f.write("chefspec: bundle exec rspec $SANDBOX/$COOKBOOK/test/unit/spec\n") }
|
147
145
|
end
|
148
146
|
|
149
147
|
def self.init_strainer(cookbook_name, options)
|