diff options
author | Tor Magnus Rakvåg <tm@intility.no> | 2018-06-13 09:51:51 +0200 |
---|---|---|
committer | Tor Magnus Rakvåg <tm@intility.no> | 2018-06-13 09:51:51 +0200 |
commit | b49ca16636b77426e615adb30cc106d961575572 (patch) | |
tree | 52f3e5424cdc5d8c7c58a68a09b85d44f087019e /spec | |
parent | fae8378ca0a7646a69a5683d086a841dce591ba6 (diff) | |
download | chef-b49ca16636b77426e615adb30cc106d961575572.tar.gz |
rename name property to source_name
Signed-off-by: Tor Magnus Rakvåg <tm@intility.no>
Diffstat (limited to 'spec')
-rw-r--r-- | spec/unit/resource/powershell_package_source_spec.rb | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/spec/unit/resource/powershell_package_source_spec.rb b/spec/unit/resource/powershell_package_source_spec.rb index 0265547b21..d8cb8a09a0 100644 --- a/spec/unit/resource/powershell_package_source_spec.rb +++ b/spec/unit/resource/powershell_package_source_spec.rb @@ -26,7 +26,7 @@ describe Chef::Resource::PowershellPackageSource do end it "the name_property is 'name'" do - expect(resource.name).to eql("MyGallery") + expect(resource.source_name).to eql("MyGallery") end it "the default action is :register" do @@ -81,7 +81,7 @@ describe Chef::Resource::PowershellPackageSource do describe "#build_ps_repository_command" do before do - resource.name("MyGallery") + resource.source_name("MyGallery") resource.url("https://mygallery.company.co/api/v2/") end @@ -145,7 +145,7 @@ describe Chef::Resource::PowershellPackageSource do describe "#build_package_source_command" do before do - resource.name("NuGet") + resource.source_name("NuGet") resource.url("http://nuget.org/api/v2/") end @@ -160,7 +160,7 @@ describe Chef::Resource::PowershellPackageSource do end it "builds a command with a different provider" do - resource.name("choco") + resource.source_name("choco") resource.url("https://chocolatey.org/api/v2/") resource.provider_name("chocolatey") expect(provider.build_package_source_command("Register", resource)).to eql("Register-PackageSource -Name 'choco' -Location 'https://chocolatey.org/api/v2/' -Trusted:$false -ProviderName 'chocolatey'") @@ -183,7 +183,7 @@ describe Chef::Resource::PowershellPackageSource do end it "builds a command with a different provider" do - resource.name("choco") + resource.source_name("choco") resource.url("https://chocolatey.org/api/v2/") resource.provider_name("chocolatey") expect(provider.build_package_source_command("Set", resource)).to eql("Set-PackageSource -Name 'choco' -Location 'https://chocolatey.org/api/v2/' -Trusted:$false -ProviderName 'chocolatey'") @@ -206,13 +206,13 @@ describe Chef::Resource::PowershellPackageSource do describe "#package_source_exists?" do it "returns true if it exists" do allow(provider).to receive(:powershell_out!).with("(Get-PackageSource -Name 'MyGallery').Name").and_return(double("powershell_out!", :stdout => "MyGallery\r\n")) - resource.name("MyGallery") + resource.source_name("MyGallery") expect(provider.package_source_exists?).to eql(true) end it "returns false if it doesn't exist" do allow(provider).to receive(:powershell_out!).with("(Get-PackageSource -Name 'MyGallery').Name").and_return(double("powershell_out!", :stdout => "")) - resource.name("MyGallery") + resource.source_name("MyGallery") expect(provider.package_source_exists?).to eql(false) end end |