diff options
author | John Keiser <john@johnkeiser.com> | 2015-07-30 09:39:51 -0600 |
---|---|---|
committer | John Keiser <john@johnkeiser.com> | 2015-07-30 09:52:42 -0600 |
commit | 221e63a2de6414ae1d4422753589dccf7d35c351 (patch) | |
tree | dfd50c9ca41c605a60f63ce1b11b2e4a631d7963 /spec/integration | |
parent | 96053ccb88f145a1f6a354cfe709bc99176723cb (diff) | |
download | chef-221e63a2de6414ae1d4422753589dccf7d35c351.tar.gz |
Make Resource.action work with non-standard namesjk/action_dash
Diffstat (limited to 'spec/integration')
-rw-r--r-- | spec/integration/recipes/resource_action_spec.rb | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/spec/integration/recipes/resource_action_spec.rb b/spec/integration/recipes/resource_action_spec.rb index cee79133a9..1881ab0d03 100644 --- a/spec/integration/recipes/resource_action_spec.rb +++ b/spec/integration/recipes/resource_action_spec.rb @@ -340,4 +340,27 @@ describe "Resource.action" do expect(NoActionJackson.action_was).to eq [:nothing] end end + + context "With a resource with action a-b-c d" do + before(:context) { + class WeirdActionJackson < Chef::Resource + use_automatic_resource_name + + class <<self + attr_accessor :action_was + end + + action "a-b-c d" do + WeirdActionJackson.action_was = action + end + end + } + + it "Running the action works" do + expect_recipe { + weird_action_jackson 'hi' + }.to be_up_to_date + expect(WeirdActionJackson.action_was).to eq :"a-b-c d" + end + end end |