summaryrefslogtreecommitdiff
path: root/spec/unit/event_dispatch
diff options
context:
space:
mode:
authorThom May <thom@chef.io>2016-01-14 14:08:03 +0000
committerThom May <thom@chef.io>2016-01-14 14:08:03 +0000
commit51cfbdc4d16739caac4d946fadbe678444aafe34 (patch)
tree56dfd8f1cd9fd933de27268b32402e955a43ac2b /spec/unit/event_dispatch
parent05064423057d4cf46f4713b81b08829cf6d20af6 (diff)
downloadchef-51cfbdc4d16739caac4d946fadbe678444aafe34.tar.gz
Use double quotes by default
This is an entirely mechanically generated (chefstyle -a) change, to go along with chef/chefstyle#5 . We should pick something and use it consistently, and my opinion is that double quotes are the appropriate thing.
Diffstat (limited to 'spec/unit/event_dispatch')
-rw-r--r--spec/unit/event_dispatch/dispatcher_spec.rb4
-rw-r--r--spec/unit/event_dispatch/dsl_spec.rb26
2 files changed, 15 insertions, 15 deletions
diff --git a/spec/unit/event_dispatch/dispatcher_spec.rb b/spec/unit/event_dispatch/dispatcher_spec.rb
index 5a06e1d6d1..eaeb164414 100644
--- a/spec/unit/event_dispatch/dispatcher_spec.rb
+++ b/spec/unit/event_dispatch/dispatcher_spec.rb
@@ -17,8 +17,8 @@
# limitations under the License.
#
-require 'spec_helper'
-require 'chef/event_dispatch/dispatcher'
+require "spec_helper"
+require "chef/event_dispatch/dispatcher"
describe Chef::EventDispatch::Dispatcher do
diff --git a/spec/unit/event_dispatch/dsl_spec.rb b/spec/unit/event_dispatch/dsl_spec.rb
index 0f7adce7a8..7c74e6738c 100644
--- a/spec/unit/event_dispatch/dsl_spec.rb
+++ b/spec/unit/event_dispatch/dsl_spec.rb
@@ -16,8 +16,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
-require 'spec_helper'
-require 'chef/event_dispatch/dsl'
+require "spec_helper"
+require "chef/event_dispatch/dsl"
describe Chef::EventDispatch::DSL do
let(:events) do
@@ -32,25 +32,25 @@ describe Chef::EventDispatch::DSL do
Chef.set_run_context(run_context)
end
- subject{ described_class.new('test') }
+ subject{ described_class.new("test") }
- it 'set handler name' do
+ it "set handler name" do
subject.on(:run_started) {}
- expect(events.subscribers.first.name).to eq('test')
+ expect(events.subscribers.first.name).to eq("test")
end
- it 'raise error when invalid event type is supplied' do
+ it "raise error when invalid event type is supplied" do
expect do
subject.on(:foo_bar) {}
end.to raise_error(Chef::Exceptions::InvalidEventType)
end
- it 'register user hooks against valid event type' do
- subject.on(:run_failed) {'testhook'}
- expect(events.subscribers.first.run_failed).to eq('testhook')
+ it "register user hooks against valid event type" do
+ subject.on(:run_failed) {"testhook"}
+ expect(events.subscribers.first.run_failed).to eq("testhook")
end
- it 'preserve state across event hooks' do
+ it "preserve state across event hooks" do
calls = []
Chef.event_handler do
on :resource_updated do
@@ -60,13 +60,13 @@ describe Chef::EventDispatch::DSL do
calls << :started
end
end
- resource = Chef::Resource::RubyBlock.new('foo', run_context)
+ resource = Chef::Resource::RubyBlock.new("foo", run_context)
resource.block { }
resource.run_action(:run)
expect(calls).to eq([:started, :updated])
end
- it 'preserve instance variables across handler callbacks' do
+ it "preserve instance variables across handler callbacks" do
Chef.event_handler do
on :resource_action_start do
@ivar = [1]
@@ -75,7 +75,7 @@ describe Chef::EventDispatch::DSL do
@ivar << 2
end
end
- resource = Chef::Resource::RubyBlock.new('foo', run_context)
+ resource = Chef::Resource::RubyBlock.new("foo", run_context)
resource.block { }
resource.run_action(:run)
expect(events.subscribers.first.instance_variable_get(:@ivar)).to eq([1, 2])