meez 0.0.5 → 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/meez/meez.rb +9 -11
  2. metadata +1 -1
@@ -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
- Dir.mkdir(spec_path, 0755)
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 '#{cookbook_name}::default' do
127
+ describe 'logstash::default' do
128
+ before { stub_resources }
127
129
  describe 'ubuntu' do
128
- before do
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 tests' do
135
- pending 'or it gets the hose again'
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)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: meez
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: