teststrap 1.1.7 → 1.1.8

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: fdbb070b114cfadef42ca796008d143a0291e318
4
- data.tar.gz: b2d02a4af4fec2ba0af8f34995408f27774d1e33
3
+ metadata.gz: ddab98fc60db906951e8f6eabf22d9e44cf16b2a
4
+ data.tar.gz: 437f94278b9492efc34a1228527cc59482fe9ca2
5
5
  SHA512:
6
- metadata.gz: 028a4f47780bcf7ea54b638b6fc68dc96520a039034c2abce391b3128fa3db6d7fe97b444b8631d0936172dbfef903d99fe9634dccb80748e8bbfaa87c6e91c2
7
- data.tar.gz: d4797a0324d4dbc7e685f7807e1c392368754129772739353e061d6c282c8ae2ebea289b130ff5d6f3a20d944c34cdcc98235cfee05ceb255068f01d48288d65
6
+ metadata.gz: c0fba0d48817eb00b7e0c120602c3d332ad516ac6a09de99d50fadb10accdfdb4c0db984e2d08610eed3b1bf9989217ae346ae5e6c0ab4da97afc56102da78d3
7
+ data.tar.gz: 01d5dd6cd815a983e92c97eda9447a069e4af2a306f85db9e8a69a973502afed49591f066961ad13de7d51d053d88bdbb0445a134b9bf142543073980beba813
@@ -0,0 +1,11 @@
1
+ def mock_encrypted_databag(bag, key, return_value)
2
+ stub_data_bag_item('encryption_keys', 'databag_encryption_key').
3
+ and_return({ 'id' => 'databag_encryption_key', 'key' => 'secret' })
4
+
5
+ allow(Chef::EncryptedDataBagItem).to receive(:load_secret).
6
+ and_return('secret')
7
+
8
+ expect(Chef::EncryptedDataBagItem).to receive(:load).
9
+ with(bag, key, 'secret').
10
+ and_return(return_value)
11
+ end
@@ -1,8 +1,10 @@
1
+ require 'chefspec_helper'
1
2
  require 'chefspec'
3
+ require 'chefspec/berkshelf'
2
4
 
3
5
  describe "<%= cookbook_name %>::default" do
4
6
  let(:chef_run) do
5
- ChefSpec::ChefRunner.new do |node|
7
+ ChefSpec::Runner.new do |node|
6
8
  end.converge '<%= cookbook_name %>::default'
7
9
  end
8
10
  end
data/lib/teststrap.rb CHANGED
@@ -21,6 +21,7 @@ module Teststrap
21
21
  copy_file "Strainerfile"
22
22
  copy_file "Thorfile"
23
23
  template "spec/default_spec.rb"
24
+ template "spec/chefspec_helper.rb"
24
25
  template "test/integration/default/serverspec/localhost/default_spec.rb"
25
26
  template "test/integration/default/serverspec/spec_helper.rb"
26
27
  template ".kitchen.yml"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: teststrap
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.7
4
+ version: 1.1.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Casecommons
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-12-10 00:00:00.000000000 Z
11
+ date: 2013-12-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor
@@ -66,6 +66,7 @@ files:
66
66
  - generator_files/LICENSE
67
67
  - generator_files/metadata.rb
68
68
  - generator_files/README.md
69
+ - generator_files/spec/chefspec_helper.rb
69
70
  - generator_files/spec/default_spec.rb
70
71
  - generator_files/Strainerfile
71
72
  - generator_files/test/integration/default/serverspec/localhost/default_spec.rb