teststrap 1.2.4 → 1.2.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4fe148b7257e2e0b45fb8fcd5edf42c6fe2dc346
4
- data.tar.gz: 1f7e8b75743ecaa4d654f8e950ed2322cb5d68eb
3
+ metadata.gz: aa3f126204cfefd2023bcfcfb56123f46a418c3d
4
+ data.tar.gz: cc755162a6a8f4214d34256996fb2613f5e4cdfc
5
5
  SHA512:
6
- metadata.gz: 96de562161f476a4077e63b662d9fa1b65511b3db3b330d9b07dd4b53a20e2595550c37fda47dd2fefbab5a553192415c1a658a5dacef3c244a6ea31cf06b4a1
7
- data.tar.gz: 4e904ff3979f82c14923461ad344601d696347448118fe42239b0207aa3f9db47a8d467c5f05dd39545a99f86d2855e057e9f47d1260cb8aaef79d6509edbc13
6
+ metadata.gz: 23153b26e84196ccc892f20e9c19e91de6c060989a7dbf5ec3066fcc9f5db6b841c2ffcafc848b2f72b4ca98b26f683c7e6e58c9001af813588d590003df8757
7
+ data.tar.gz: 3bfdde812cd6b9c25aac2eeba4ebd22fd9e0fce00aa8efcf4b3149ea505945e183e544aea1d28c32dfd9a3340d3b436049e2f2128a5267433125ec75e19734e1
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env ruby
2
- $:.push File.expand_path('../../lib', __FILE__)
2
+ $LOAD_PATH.push File.expand_path('../../lib', __FILE__)
3
3
 
4
4
  require 'teststrap'
5
5
 
@@ -2,7 +2,7 @@ require 'chefspec_helper'
2
2
  require 'chefspec'
3
3
  require 'chefspec/berkshelf'
4
4
 
5
- describe "<%= cookbook_name %>::default" do
5
+ describe '<%= cookbook_name %>::default' do
6
6
  let(:chef_run) do
7
7
  ChefSpec::Runner.new do |node|
8
8
  end.converge(described_recipe)
@@ -9,28 +9,28 @@ module Teststrap
9
9
 
10
10
  default_task :generate_tests
11
11
 
12
- desc "generate_tests", "generate test files"
12
+ desc 'generate_tests', 'generate test files'
13
13
  def generate_tests
14
14
  @cookbook_name = current_directory_name
15
- puts "generating testfiles::"
16
- copy_file ".gitignore"
17
- copy_file ".rubocop.yml"
18
- copy_file "Berksfile"
19
- copy_file "chefignore"
20
- copy_file "Gemfile"
21
- copy_file "LICENSE"
22
- copy_file "rubocop-disabled.yml"
23
- copy_file "Strainerfile"
24
- copy_file "Thorfile"
25
- template "spec/default_spec.rb"
26
- template "spec/chefspec_helper.rb"
27
- template "test/integration/default/serverspec/localhost/default_spec.rb",
15
+ puts 'generating testfiles::'
16
+ copy_file '.gitignore'
17
+ copy_file '.rubocop.yml'
18
+ copy_file 'Berksfile'
19
+ copy_file 'chefignore'
20
+ copy_file 'Gemfile'
21
+ copy_file 'LICENSE'
22
+ copy_file 'rubocop-disabled.yml'
23
+ copy_file 'Strainerfile'
24
+ copy_file 'Thorfile'
25
+ template 'spec/default_spec.rb'
26
+ template 'spec/chefspec_helper.rb'
27
+ template 'test/integration/default/serverspec/localhost/default_spec.rb',
28
28
  "test/integration/#{@cookbook_name}/serverspec/localhost/default_spec.rb"
29
- template "test/integration/default/serverspec/spec_helper.rb",
29
+ template 'test/integration/default/serverspec/spec_helper.rb',
30
30
  "test/integration/#{@cookbook_name}/serverspec/spec_helper.rb"
31
- template ".kitchen.yml"
32
- template "metadata.rb"
33
- template "README.md"
31
+ template '.kitchen.yml'
32
+ template 'metadata.rb'
33
+ template 'README.md'
34
34
  end
35
35
 
36
36
  no_commands do
@@ -3,8 +3,8 @@ require 'spec_helper'
3
3
  describe Teststrap::Teststrap do
4
4
  let(:teststrap) { described_class.new }
5
5
 
6
- describe "generate_tests" do
7
- FILES = [ 'Gemfile', 'Berksfile', 'Strainerfile', 'Thorfile', '.gitignore', 'LICENSE']
6
+ describe 'generate_tests' do
7
+ FILES = ['Gemfile', 'Berksfile', 'Strainerfile', 'Thorfile', '.gitignore', 'LICENSE']
8
8
  TEMPLATES = [
9
9
  'README.md',
10
10
  'metadata.rb',
@@ -21,7 +21,7 @@ describe Teststrap::Teststrap do
21
21
  .and_return('test_cookbook')
22
22
  end
23
23
 
24
- it "should generate files" do
24
+ it 'should generate files' do
25
25
 
26
26
  FILES.each do |file|
27
27
  teststrap.should_receive(:copy_file).with(file)
@@ -30,7 +30,7 @@ describe Teststrap::Teststrap do
30
30
  teststrap.generate_tests
31
31
  end
32
32
 
33
- it "should generate templates" do
33
+ it 'should generate templates' do
34
34
 
35
35
  TEMPLATES.each do |template|
36
36
  teststrap.should_receive(:template).with(template)
@@ -40,15 +40,15 @@ describe Teststrap::Teststrap do
40
40
  end
41
41
  end
42
42
 
43
- describe "current_directory_name" do
44
- it "return current working directory name" do
43
+ describe 'current_directory_name' do
44
+ it 'return current working directory name' do
45
45
  Dir.stub('pwd').and_return('test/dir/test_cookbook')
46
46
  expect(teststrap.current_directory_name).to eq 'test_cookbook'
47
47
  end
48
48
  end
49
49
 
50
- describe "source_root" do
51
- it "return generator file path" do
50
+ describe 'source_root' do
51
+ it 'return generator file path' do
52
52
  expect(described_class.source_root)
53
53
  .to include 'teststrap/generator_files'
54
54
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: teststrap
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.4
4
+ version: 1.2.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Casecommons