summaryrefslogtreecommitdiff
path: root/spec/unit
diff options
context:
space:
mode:
authorLamont Granquist <lamont@scriptkiddie.org>2016-08-09 12:53:25 -0700
committerLamont Granquist <lamont@scriptkiddie.org>2016-08-16 18:41:25 -0700
commiteba6379b0048ef33913a03c60677ed521a9c57e1 (patch)
treec98f3a317c390130f53bf76b11cd878e608ffec3 /spec/unit
parentd0f4283fe47cbbe251eb34fee8657901374ff336 (diff)
downloadchef-eba6379b0048ef33913a03c60677ed521a9c57e1.tar.gz
fix Lint/UnderscorePrefixedVariableName cop
Diffstat (limited to 'spec/unit')
-rw-r--r--spec/unit/provider/package/freebsd/port_spec.rb8
-rw-r--r--spec/unit/resource/freebsd_package_spec.rb12
2 files changed, 10 insertions, 10 deletions
diff --git a/spec/unit/provider/package/freebsd/port_spec.rb b/spec/unit/provider/package/freebsd/port_spec.rb
index b593da4ff1..4ae8d960a2 100644
--- a/spec/unit/provider/package/freebsd/port_spec.rb
+++ b/spec/unit/provider/package/freebsd/port_spec.rb
@@ -74,8 +74,8 @@ describe Chef::Provider::Package::Freebsd::Port do
it "should check 'pkg info' if make supports WITH_PKGNG if freebsd version is < 1000017" do
pkg_enabled = OpenStruct.new(:stdout => "yes\n")
- [1000016, 1000000, 901503, 902506, 802511].each do |__freebsd_version|
- @node.automatic_attrs[:os_version] = __freebsd_version
+ [1000016, 1000000, 901503, 902506, 802511].each do |freebsd_version|
+ @node.automatic_attrs[:os_version] = freebsd_version
expect(@new_resource).to receive(:shell_out!).with("make -V WITH_PKGNG", env: nil).and_return(pkg_enabled)
expect(@provider).to receive(:shell_out!).with('pkg info "zsh"', env: nil, returns: [0, 70], timeout: 900).and_return(@pkg_info)
expect(@provider.current_installed_version).to eq("3.1.7")
@@ -83,8 +83,8 @@ describe Chef::Provider::Package::Freebsd::Port do
end
it "should check 'pkg info' if the freebsd version is greater than or equal to 1000017" do
- __freebsd_version = 1000017
- @node.automatic_attrs[:os_version] = __freebsd_version
+ freebsd_version = 1000017
+ @node.automatic_attrs[:os_version] = freebsd_version
expect(@provider).to receive(:shell_out!).with('pkg info "zsh"', env: nil, returns: [0, 70], timeout: 900).and_return(@pkg_info)
expect(@provider.current_installed_version).to eq("3.1.7")
end
diff --git a/spec/unit/resource/freebsd_package_spec.rb b/spec/unit/resource/freebsd_package_spec.rb
index 0842114c47..4edc3dbc78 100644
--- a/spec/unit/resource/freebsd_package_spec.rb
+++ b/spec/unit/resource/freebsd_package_spec.rb
@@ -52,10 +52,10 @@ describe Chef::Resource::FreebsdPackage do
end
end
- describe "if __Freebsd_version is greater than or equal to 1000017" do
+ describe "if freebsd_version is greater than or equal to 1000017" do
it "should be Freebsd::Pkgng" do
- [1000017, 1000018, 1000500, 1001001, 1100000].each do |__freebsd_version|
- @node.automatic_attrs[:os_version] = __freebsd_version
+ [1000017, 1000018, 1000500, 1001001, 1100000].each do |freebsd_version|
+ @node.automatic_attrs[:os_version] = freebsd_version
@resource.after_created
expect(@resource.provider).to eq(Chef::Provider::Package::Freebsd::Pkgng)
end
@@ -71,13 +71,13 @@ describe Chef::Resource::FreebsdPackage do
end
end
- describe "if __Freebsd_version is less than 1000017 and pkgng not enabled" do
+ describe "if freebsd_version is less than 1000017 and pkgng not enabled" do
it "should be Freebsd::Pkg" do
pkg_enabled = OpenStruct.new(:stdout => "\n")
allow(@resource).to receive(:shell_out!).with("make -V WITH_PKGNG", :env => nil).and_return(pkg_enabled)
- [1000016, 1000000, 901503, 902506, 802511].each do |__freebsd_version|
- @node.automatic_attrs[:os_version] = __freebsd_version
+ [1000016, 1000000, 901503, 902506, 802511].each do |freebsd_version|
+ @node.automatic_attrs[:os_version] = freebsd_version
@resource.after_created
expect(@resource.provider).to eq(Chef::Provider::Package::Freebsd::Pkg)
end