diff options
Diffstat (limited to 'spec/unit/knife/core/object_loader_spec.rb')
-rw-r--r-- | spec/unit/knife/core/object_loader_spec.rb | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/spec/unit/knife/core/object_loader_spec.rb b/spec/unit/knife/core/object_loader_spec.rb index 0b572cc1f0..50f358379e 100644 --- a/spec/unit/knife/core/object_loader_spec.rb +++ b/spec/unit/knife/core/object_loader_spec.rb @@ -17,15 +17,15 @@ # limitations under the License. # -require 'spec_helper' -require 'chef/knife/core/object_loader' +require "spec_helper" +require "chef/knife/core/object_loader" describe Chef::Knife::Core::ObjectLoader do before(:each) do @knife = Chef::Knife.new @stdout = StringIO.new allow(@knife.ui).to receive(:stdout).and_return(@stdout) - Dir.chdir(File.join(CHEF_SPEC_DATA, 'object_loader')) + Dir.chdir(File.join(CHEF_SPEC_DATA, "object_loader")) end shared_examples_for "Chef object" do |chef_class| @@ -34,14 +34,14 @@ describe Chef::Knife::Core::ObjectLoader do end it "should has a attribute 'name'" do - expect(@object.name).to eql('test') + expect(@object.name).to eql("test") end end { - 'nodes' => Chef::Node, - 'roles' => Chef::Role, - 'environments' => Chef::Environment, + "nodes" => Chef::Node, + "roles" => Chef::Role, + "environments" => Chef::Environment, }.each do |repo_location, chef_class| describe "when the file is a #{chef_class}" do @@ -51,7 +51,7 @@ describe Chef::Knife::Core::ObjectLoader do describe "when the file is a Ruby" do before do - @object = @loader.load_from(repo_location, 'test.rb') + @object = @loader.load_from(repo_location, "test.rb") end it_behaves_like "Chef object", chef_class @@ -61,7 +61,7 @@ describe Chef::Knife::Core::ObjectLoader do describe "when the file is a JSON" do describe "and it has defined 'json_class'" do before do - @object = @loader.load_from(repo_location, 'test_json_class.json') + @object = @loader.load_from(repo_location, "test_json_class.json") end it_behaves_like "Chef object", chef_class @@ -69,7 +69,7 @@ describe Chef::Knife::Core::ObjectLoader do describe "and it has not defined 'json_class'" do before do - @object = @loader.load_from(repo_location, 'test.json') + @object = @loader.load_from(repo_location, "test.json") end it_behaves_like "Chef object", chef_class |