diff options
Diffstat (limited to 'spec/unit')
-rw-r--r-- | spec/unit/api_client/registration_spec.rb | 2 | ||||
-rw-r--r-- | spec/unit/decorator_spec.rb | 4 | ||||
-rw-r--r-- | spec/unit/knife_spec.rb | 4 | ||||
-rw-r--r-- | spec/unit/lwrp_spec.rb | 10 | ||||
-rw-r--r-- | spec/unit/node_spec.rb | 2 | ||||
-rw-r--r-- | spec/unit/recipe_spec.rb | 4 |
6 files changed, 13 insertions, 13 deletions
diff --git a/spec/unit/api_client/registration_spec.rb b/spec/unit/api_client/registration_spec.rb index 6fd1d4d0e1..3e786c3c02 100644 --- a/spec/unit/api_client/registration_spec.rb +++ b/spec/unit/api_client/registration_spec.rb @@ -98,7 +98,7 @@ describe Chef::ApiClient::Registration do it "has an HTTP client configured with validator credentials" do expect(registration.http_api).to be_a_kind_of(Chef::ServerAPI) expect(registration.http_api.options[:client_name]).to eq("test-validator") - auth = registration.http_api.middlewares.find { |klass| klass.kind_of? Chef::HTTP::Authenticator } + auth = registration.http_api.middlewares.find { |klass| klass.is_a? Chef::HTTP::Authenticator } expect(auth.client_name).to eq("test-validator") end diff --git a/spec/unit/decorator_spec.rb b/spec/unit/decorator_spec.rb index 6d73db2cc4..80bbd73bdf 100644 --- a/spec/unit/decorator_spec.rb +++ b/spec/unit/decorator_spec.rb @@ -28,11 +28,11 @@ def impersonates_a(klass) end it "#kind_of?(#{klass}) is true" do - expect(decorator.kind_of?(klass)).to be true + expect(decorator.is_a?(klass)).to be true end it "#kind_of?(Chef::Decorator) is true" do - expect(decorator.kind_of?(Chef::Decorator)).to be true + expect(decorator.is_a?(Chef::Decorator)).to be true end it "#instance_of?(#{klass}) is false" do diff --git a/spec/unit/knife_spec.rb b/spec/unit/knife_spec.rb index 70e4091847..bab6b579b5 100644 --- a/spec/unit/knife_spec.rb +++ b/spec/unit/knife_spec.rb @@ -205,7 +205,7 @@ describe Chef::Knife do KnifeSpecs.send :remove_const, :TestYourself end Kernel.load(File.join(CHEF_SPEC_DATA, "knife_subcommand", "test_yourself.rb")) - Chef::Knife.subcommands.each { |name, klass| Chef::Knife.subcommands.delete(name) unless klass.kind_of?(Class) } + Chef::Knife.subcommands.each { |name, klass| Chef::Knife.subcommands.delete(name) unless klass.is_a?(Class) } end it "confirms that the headers include X-Remote-Request-Id" do @@ -220,7 +220,7 @@ describe Chef::Knife do KnifeSpecs.send :remove_const, :TestYourself end Kernel.load(File.join(CHEF_SPEC_DATA, "knife_subcommand", "test_yourself.rb")) - Chef::Knife.subcommands.each { |name, klass| Chef::Knife.subcommands.delete(name) unless klass.kind_of?(Class) } + Chef::Knife.subcommands.each { |name, klass| Chef::Knife.subcommands.delete(name) unless klass.is_a?(Class) } end it "merges the global knife CLI options" do diff --git a/spec/unit/lwrp_spec.rb b/spec/unit/lwrp_spec.rb index 68db44e537..5c1bdb687c 100644 --- a/spec/unit/lwrp_spec.rb +++ b/spec/unit/lwrp_spec.rb @@ -590,7 +590,7 @@ describe "LWRP" do it "get_lwrp(:lwrp_once).new is an instance of the LWRP class" do lwrp = get_lwrp(:lwrp_once).new("hi") - expect(lwrp.kind_of?(test_lwrp_class)).to be_truthy + expect(lwrp.is_a?(test_lwrp_class)).to be_truthy expect(lwrp.is_a?(test_lwrp_class)).to be_truthy expect(get_lwrp(:lwrp_once) === lwrp).to be_truthy expect(test_lwrp_class === lwrp).to be_truthy @@ -603,28 +603,28 @@ describe "LWRP" do it "subclass.new is a subclass" do lwrp = subclass.new("hi") - expect(lwrp.kind_of?(subclass)).to be_truthy + expect(lwrp.is_a?(subclass)).to be_truthy expect(lwrp.is_a?(subclass)).to be_truthy expect(subclass === lwrp).to be_truthy expect(lwrp.class === subclass) end it "subclass.new is an instance of the LWRP class" do lwrp = subclass.new("hi") - expect(lwrp.kind_of?(test_lwrp_class)).to be_truthy + expect(lwrp.is_a?(test_lwrp_class)).to be_truthy expect(lwrp.is_a?(test_lwrp_class)).to be_truthy expect(test_lwrp_class === lwrp).to be_truthy expect(lwrp.class === test_lwrp_class) end it "subclass.new is a get_lwrp(:lwrp_once)" do lwrp = subclass.new("hi") - expect(lwrp.kind_of?(get_lwrp(:lwrp_once))).to be_truthy + expect(lwrp.is_a?(get_lwrp(:lwrp_once))).to be_truthy expect(lwrp.is_a?(get_lwrp(:lwrp_once))).to be_truthy expect(get_lwrp(:lwrp_once) === lwrp).to be_truthy expect(lwrp.class === get_lwrp(:lwrp_once)) end it "get_lwrp(:lwrp_once).new is *not* a subclass" do lwrp = get_lwrp(:lwrp_once).new("hi") - expect(lwrp.kind_of?(subclass)).to be_falsey + expect(lwrp.is_a?(subclass)).to be_falsey expect(lwrp.is_a?(subclass)).to be_falsey expect(subclass === lwrp.class).to be_falsey expect(subclass === get_lwrp(:lwrp_once)).to be_falsey diff --git a/spec/unit/node_spec.rb b/spec/unit/node_spec.rb index 0fe375a4df..c170d4730e 100644 --- a/spec/unit/node_spec.rb +++ b/spec/unit/node_spec.rb @@ -1385,7 +1385,7 @@ describe Chef::Node do describe "inflated" do it "should return a hash of node names and objects" do n1 = double("Chef::Node", name: "one") - allow(n1).to receive(:kind_of?).with(Chef::Node) { true } + allow(n1).to receive(:is_a?).with(Chef::Node) { true } expect(@query).to receive(:search).with(:node).and_yield(n1) r = Chef::Node.list(true) expect(r["one"]).to eq(n1) diff --git a/spec/unit/recipe_spec.rb b/spec/unit/recipe_spec.rb index 1bc84745ad..a4fdbd9809 100644 --- a/spec/unit/recipe_spec.rb +++ b/spec/unit/recipe_spec.rb @@ -115,7 +115,7 @@ describe Chef::Recipe do node.automatic[:platform_version] = "123" res = recipe.laughter "timmy" expect(res.name).to eql("timmy") - res.kind_of?(ShaunTheSheep) + res.is_a?(ShaunTheSheep) end it "locate a resource for all platforms" do @@ -124,7 +124,7 @@ describe Chef::Recipe do YourMom.provides :love_and_caring res = recipe.love_and_caring "mommy" expect(res.name).to eql("mommy") - res.kind_of?(YourMom) + res.is_a?(YourMom) end describe "when there is more than one resource that resolves on a node" do |