Skip to content

Commit

Permalink
(PUP-7130) Fix issues pointed out in code review
Browse files Browse the repository at this point in the history
- Fix type 'a Integer' => 'an Integer'
- Retain TypeCalculator tests for Fixnum and Bignum class
- Fix AppVeyor problem caused by weird rspec discriminator behavior
  • Loading branch information
thallgren committed Feb 23, 2017
1 parent a0e4772 commit ed393e5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion spec/unit/provider/user/directoryservice_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -799,7 +799,7 @@ module Puppet::Util::Plist
it "should accept a hash containing a PBKDF2 password hash, salt, and iterations value and return the correct iterations value" do
expect(provider.class.get_salted_sha512_pbkdf2('iterations', pbkdf2_embedded_bplist_hash)).to eq(pbkdf2_iterations_value)
end
it "should return a Integer value when looking up the PBKDF2 iterations value" do
it "should return an Integer value when looking up the PBKDF2 iterations value" do
expect(provider.class.get_salted_sha512_pbkdf2('iterations', pbkdf2_embedded_bplist_hash)).to be_a(Integer)
end
it "should raise an error if a field other than 'entropy', 'salt', or 'iterations' is passed" do
Expand Down
10 changes: 5 additions & 5 deletions spec/unit/util/run_mode_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def self.gte_ruby_2_4
end
end

it "fails when asking for the conf_dir as non-root and there is no $HOME", :unless => gte_ruby_2_4 do
it "fails when asking for the conf_dir as non-root and there is no $HOME", :unless => gte_ruby_2_4 || Puppet.features.microsoft_windows? do
as_non_root do
without_home do
expect { @run_mode.conf_dir }.to raise_error ArgumentError, /couldn't find HOME/
Expand Down Expand Up @@ -64,7 +64,7 @@ def self.gte_ruby_2_4
end
end

it "fails when asking for the code_dir as non-root and there is no $HOME", :unless => gte_ruby_2_4 do
it "fails when asking for the code_dir as non-root and there is no $HOME", :unless => gte_ruby_2_4 || Puppet.features.microsoft_windows? do
as_non_root do
without_home do
expect { @run_mode.code_dir }.to raise_error ArgumentError, /couldn't find HOME/
Expand All @@ -82,7 +82,7 @@ def self.gte_ruby_2_4
as_non_root { expect(@run_mode.var_dir).to eq(File.expand_path('~/.puppetlabs/opt/puppet/cache')) }
end

it "fails when asking for the var_dir as non-root and there is no $HOME", :unless => gte_ruby_2_4 do
it "fails when asking for the var_dir as non-root and there is no $HOME", :unless => gte_ruby_2_4 || Puppet.features.microsoft_windows? do
as_non_root do
without_home do
expect { @run_mode.var_dir }.to raise_error ArgumentError, /couldn't find HOME/
Expand All @@ -103,7 +103,7 @@ def self.gte_ruby_2_4
as_non_root { expect(@run_mode.log_dir).to eq(File.expand_path('~/.puppetlabs/var/log')) }
end

it "fails when asking for the log_dir and there is no $HOME", :unless => gte_ruby_2_4 do
it "fails when asking for the log_dir and there is no $HOME", :unless => gte_ruby_2_4 || Puppet.features.microsoft_windows? do
as_non_root do
without_home do
expect { @run_mode.log_dir }.to raise_error ArgumentError, /couldn't find HOME/
Expand All @@ -125,7 +125,7 @@ def self.gte_ruby_2_4
as_non_root { expect(@run_mode.run_dir).to eq(File.expand_path('~/.puppetlabs/var/run')) }
end

it "fails when asking for the run_dir and there is no $HOME", :unless => gte_ruby_2_4 do
it "fails when asking for the run_dir and there is no $HOME", :unless => gte_ruby_2_4 || Puppet.features.microsoft_windows? do
as_non_root do
without_home do
expect { @run_mode.run_dir }.to raise_error ArgumentError, /couldn't find HOME/
Expand Down

0 comments on commit ed393e5

Please sign in to comment.