summaryrefslogtreecommitdiff
path: root/spec/integration/recipes/resource_action_spec.rb
diff options
context:
space:
mode:
authorJohn Keiser <john@johnkeiser.com>2015-07-10 12:15:07 -0600
committerJohn Keiser <john@johnkeiser.com>2015-09-22 11:48:17 -0700
commit064e0a6b90d1e9a1e00e0c9ef4d18eb1ecc33a3e (patch)
treeb1c654fce7526bc352dc494e7ffa5943fde017c5 /spec/integration/recipes/resource_action_spec.rb
parent871c858dbcec3dabec64474b68feb16372556377 (diff)
downloadchef-064e0a6b90d1e9a1e00e0c9ef4d18eb1ecc33a3e.tar.gz
Rename action_provider_class to less-wordy action_classjk/declare_action_class
Diffstat (limited to 'spec/integration/recipes/resource_action_spec.rb')
-rw-r--r--spec/integration/recipes/resource_action_spec.rb26
1 files changed, 14 insertions, 12 deletions
diff --git a/spec/integration/recipes/resource_action_spec.rb b/spec/integration/recipes/resource_action_spec.rb
index 53611c144f..1c84b986cc 100644
--- a/spec/integration/recipes/resource_action_spec.rb
+++ b/spec/integration/recipes/resource_action_spec.rb
@@ -4,7 +4,7 @@ describe "Resource.action" do
include IntegrationSupport
shared_context "ActionJackson" do
- it "The default action is the first declared action" do
+ it "the default action is the first declared action" do
converge <<-EOM, __FILE__, __LINE__+1
#{resource_dsl} 'hi' do
foo 'foo!'
@@ -14,7 +14,7 @@ describe "Resource.action" do
expect(ActionJackson.succeeded).to eq true
end
- it "The action can access recipe DSL" do
+ it "the action can access recipe DSL" do
converge <<-EOM, __FILE__, __LINE__+1
#{resource_dsl} 'hi' do
foo 'foo!'
@@ -25,7 +25,7 @@ describe "Resource.action" do
expect(ActionJackson.succeeded).to eq true
end
- it "The action can access attributes" do
+ it "the action can access attributes" do
converge <<-EOM, __FILE__, __LINE__+1
#{resource_dsl} 'hi' do
foo 'foo!'
@@ -36,7 +36,7 @@ describe "Resource.action" do
expect(ActionJackson.succeeded).to eq 'foo!'
end
- it "The action can access public methods" do
+ it "the action can access public methods" do
converge <<-EOM, __FILE__, __LINE__+1
#{resource_dsl} 'hi' do
foo 'foo!'
@@ -47,7 +47,7 @@ describe "Resource.action" do
expect(ActionJackson.succeeded).to eq 'foo_public!'
end
- it "The action can access protected methods" do
+ it "the action can access protected methods" do
converge <<-EOM, __FILE__, __LINE__+1
#{resource_dsl} 'hi' do
foo 'foo!'
@@ -58,7 +58,7 @@ describe "Resource.action" do
expect(ActionJackson.succeeded).to eq 'foo_protected!'
end
- it "The action cannot access private methods" do
+ it "the action cannot access private methods" do
expect {
converge(<<-EOM, __FILE__, __LINE__+1)
#{resource_dsl} 'hi' do
@@ -70,7 +70,7 @@ describe "Resource.action" do
expect(ActionJackson.ran_action).to eq :access_private_method
end
- it "The action cannot access resource instance variables" do
+ it "the action cannot access resource instance variables" do
converge <<-EOM, __FILE__, __LINE__+1
#{resource_dsl} 'hi' do
foo 'foo!'
@@ -81,7 +81,7 @@ describe "Resource.action" do
expect(ActionJackson.succeeded).to be_nil
end
- it "The action does not compile until the prior resource has converged" do
+ it "the action does not compile until the prior resource has converged" do
converge <<-EOM, __FILE__, __LINE__+1
ruby_block 'wow' do
block do
@@ -98,7 +98,7 @@ describe "Resource.action" do
expect(ActionJackson.succeeded).to eq 'ruby_block_converged!'
end
- it "The action's resources converge before the next resource converges" do
+ it "the action's resources converge before the next resource converges" do
converge <<-EOM, __FILE__, __LINE__+1
#{resource_dsl} 'hi' do
foo 'foo!'
@@ -214,7 +214,7 @@ describe "Resource.action" do
end
end
- context "And 'action_jackalope' inheriting from ActionJackson with an extra attribute and action" do
+ context "And 'action_jackalope' inheriting from ActionJackson with an extra attribute, action and custom method" do
before(:context) {
class ActionJackalope < ActionJackson
use_automatic_resource_name
@@ -228,6 +228,7 @@ describe "Resource.action" do
@bar
end
class <<self
+ attr_accessor :load_current_resource_ran
attr_accessor :jackalope_ran
end
action :access_jackalope do
@@ -243,6 +244,7 @@ describe "Resource.action" do
}
before do
ActionJackalope.jackalope_ran = nil
+ ActionJackalope.load_current_resource_ran = nil
end
context "action_jackson still behaves the same" do
@@ -251,7 +253,7 @@ describe "Resource.action" do
end
end
- it "The default action remains the same even though new actions were specified first" do
+ it "the default action remains the same even though new actions were specified first" do
converge {
action_jackalope 'hi' do
foo 'foo!'
@@ -320,7 +322,7 @@ describe "Resource.action" do
end
end
}
- it "The default action is :nothing" do
+ it "the default action is :nothing" do
converge {
no_action_jackson 'hi' do
foo 'foo!'