summaryrefslogtreecommitdiff
path: root/spec/unit/json_compat_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/unit/json_compat_spec.rb')
-rw-r--r--spec/unit/json_compat_spec.rb14
1 files changed, 7 insertions, 7 deletions
diff --git a/spec/unit/json_compat_spec.rb b/spec/unit/json_compat_spec.rb
index fd6469c146..524b71f09a 100644
--- a/spec/unit/json_compat_spec.rb
+++ b/spec/unit/json_compat_spec.rb
@@ -16,8 +16,8 @@
# limitations under the License.
#
-require File.expand_path('../../spec_helper', __FILE__)
-require 'chef/json_compat'
+require File.expand_path("../../spec_helper", __FILE__)
+require "chef/json_compat"
describe Chef::JSONCompat do
@@ -46,7 +46,7 @@ describe Chef::JSONCompat do
end
describe 'with JSON containing "Chef::Sandbox" as a json_class value' do
- require 'chef/sandbox' # Only needed for this test
+ require "chef/sandbox" # Only needed for this test
let(:json) { '{"json_class": "Chef::Sandbox", "arbitrary": "data"}' }
@@ -58,7 +58,7 @@ describe Chef::JSONCompat do
describe "when pretty printing an object that defines #to_json" do
class Foo
def to_json(*a)
- Chef::JSONCompat.to_json({'foo' => 1234, 'bar' => {'baz' => 5678}}, *a)
+ Chef::JSONCompat.to_json({"foo" => 1234, "bar" => {"baz" => 5678}}, *a)
end
end
@@ -73,7 +73,7 @@ describe Chef::JSONCompat do
end
describe "with the file with 252 or less nested entries" do
- let(:json) { IO.read(File.join(CHEF_SPEC_DATA, 'nested.json')) }
+ let(:json) { IO.read(File.join(CHEF_SPEC_DATA, "nested.json")) }
let(:hash) { Chef::JSONCompat.from_json(json) }
describe "when the 252 json file is loaded" do
@@ -83,9 +83,9 @@ describe Chef::JSONCompat do
it "should has 'test' as a 252 nested value" do
v = 252.times.inject(hash) do |memo, _|
- memo['key']
+ memo["key"]
end
- expect(v).to eq('test')
+ expect(v).to eq("test")
end
end
end