Sha256: 843e546ea34a4dbe98456d01ad8adba11178ee2efbd051ec2546863858b49ab5
Contents?: true
Size: 582 Bytes
Versions: 1
Compression:
Stored size: 582 Bytes
Contents
require_relative '../lib/chefspec_bootstrap' require_relative 'spec_helper' describe 'Bootstrap' do recipes = Dir.entries('spec/cookbooks/spec/recipes').map do |file| file.scan(/(.*).rb/).last.first if file.end_with?('.rb') end.compact recipes.each do |recipe| it "creates the expected spec file for #{recipe}" do bootstrap = ChefSpec::Bootstrap.new("spec/cookbooks/spec/recipes/#{recipe}.rb", nil, nil, nil, nil) spec = File.open("spec/meta/#{recipe}_spec.rb", 'rb').read expect { bootstrap.generate }.to output(spec).to_stdout end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
chefspec-bootstrap-0.1.0 | spec/chefspec_bootstrap_spec.rb |