summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortyler-ball <tyleraball@gmail.com>2014-12-15 15:52:29 -0800
committertyler-ball <tyleraball@gmail.com>2014-12-16 18:00:05 -0800
commit03fc689371f1fd73abec1781de79930e17293b09 (patch)
treef46e9d8eea2e9560fdf025cf9d987fe04773644b
parent3d593ba01b2d97019ad00aabbae9cc6fb5e134ca (diff)
downloadchef-03fc689371f1fd73abec1781de79930e17293b09.tar.gz
Changelog for https://github.com/opscode/chef/pull/2621tball/subscribe
Conflicts: CHANGELOG.md Resolving more cherry-pick merge issues
-rw-r--r--CHANGELOG.md1
-rw-r--r--spec/unit/resource_spec.rb36
2 files changed, 19 insertions, 18 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index cf6c2b5b7f..f93aa4c453 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -36,6 +36,7 @@
* [Issue 2580](https://github.com/opscode/chef/issues/2580) Make sure the relative paths are preserved when using link resource.
* [Pull 2630](https://github.com/opscode/chef/pull/2630) Improve knife's SSL error messaging
* [Issue 2606](https://github.com/opscode/chef/issues/2606) chef 12 ignores default_release for apt_package
+* [Issue 2602](https://github.com/opscode/chef/issues/2602) Fix `subscribes` resource notifications.
* [Issue 2578](https://github.com/opscode/chef/issues/2578) Check that `installed` is not empty for `keg_only` formula in Homebrew provider.
* [**gh2k**](https://github.com/gh2k):
[Issue 2625](https://github.com/opscode/chef/issues/2625) Fix missing `shell_out!` for `windows_package` resource
diff --git a/spec/unit/resource_spec.rb b/spec/unit/resource_spec.rb
index da14d20208..79d47ad4dc 100644
--- a/spec/unit/resource_spec.rb
+++ b/spec/unit/resource_spec.rb
@@ -346,10 +346,10 @@ describe Chef::Resource do
it "should convert to a hash" do
hash = @resource.to_hash
expected_keys = [ :allowed_actions, :params, :provider, :updated,
- :updated_by_last_action, :before, :supports,
- :noop, :ignore_failure, :name, :source_line,
- :action, :retries, :retry_delay, :elapsed_time,
- :default_guard_interpreter, :guard_interpreter, :sensitive ]
+ :updated_by_last_action, :before, :supports,
+ :noop, :ignore_failure, :name, :source_line,
+ :action, :retries, :retry_delay, :elapsed_time,
+ :default_guard_interpreter, :guard_interpreter, :sensitive ]
expect(hash.keys - expected_keys).to eq([])
expect(expected_keys - hash.keys).to eq([])
expect(hash[:name]).to eql("funk")
@@ -671,8 +671,8 @@ describe Chef::Resource do
snitch_var1 = snitch_var2 = 0
@runner = Chef::Runner.new(@run_context)
Chef::Platform.set(
- :resource => :cat,
- :provider => Chef::Provider::SnakeOil
+ :resource => :cat,
+ :provider => Chef::Provider::SnakeOil
)
@resource1.only_if { snitch_var1 = 1 }
@@ -704,22 +704,22 @@ describe Chef::Resource do
it 'adds mappings for a single platform' do
expect(Chef::Resource.node_map).to receive(:set).with(
- :dinobot, Chef::Resource::Klz, { platform: ['autobots'] }
- )
+ :dinobot, Chef::Resource::Klz, { platform: ['autobots'] }
+ )
klz.provides :dinobot, platform: ['autobots']
end
it 'adds mappings for multiple platforms' do
expect(Chef::Resource.node_map).to receive(:set).with(
- :energy, Chef::Resource::Klz, { platform: ['autobots', 'decepticons']}
- )
+ :energy, Chef::Resource::Klz, { platform: ['autobots', 'decepticons']}
+ )
klz.provides :energy, platform: ['autobots', 'decepticons']
end
it 'adds mappings for all platforms' do
expect(Chef::Resource.node_map).to receive(:set).with(
- :tape_deck, Chef::Resource::Klz, {}
- )
+ :tape_deck, Chef::Resource::Klz, {}
+ )
klz.provides :tape_deck
end
@@ -824,8 +824,8 @@ describe Chef::Resource do
describe "resource sensitive attribute" do
before(:each) do
- @resource_file = Chef::Resource::File.new("/nonexistent/CHEF-5098/file", @run_context)
- @action = :create
+ @resource_file = Chef::Resource::File.new("/nonexistent/CHEF-5098/file", @run_context)
+ @action = :create
end
def compiled_resource_data(resource, action, err)
@@ -842,15 +842,15 @@ describe Chef::Resource do
it "when set to false should show compiled resource for failed resource" do
expect { @resource_file.run_action(@action) }.to raise_error { |err|
- expect(compiled_resource_data(@resource_file, @action, err)).to match 'path "/nonexistent/CHEF-5098/file"'
- }
+ expect(compiled_resource_data(@resource_file, @action, err)).to match 'path "/nonexistent/CHEF-5098/file"'
+ }
end
it "when set to true should show compiled resource for failed resource" do
@resource_file.sensitive true
expect { @resource_file.run_action(@action) }.to raise_error { |err|
- expect(compiled_resource_data(@resource_file, @action, err)).to eql("suppressed sensitive resource output")
- }
+ expect(compiled_resource_data(@resource_file, @action, err)).to eql("suppressed sensitive resource output")
+ }
end
end