summaryrefslogtreecommitdiff
path: root/spec/unit/provider/user/solaris_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/unit/provider/user/solaris_spec.rb')
-rw-r--r--spec/unit/provider/user/solaris_spec.rb10
1 files changed, 5 insertions, 5 deletions
diff --git a/spec/unit/provider/user/solaris_spec.rb b/spec/unit/provider/user/solaris_spec.rb
index 5500eac812..d8bd0f9e75 100644
--- a/spec/unit/provider/user/solaris_spec.rb
+++ b/spec/unit/provider/user/solaris_spec.rb
@@ -27,7 +27,7 @@ describe Chef::Provider::User::Solaris do
p.current_resource = @current_resource
# Prevent the useradd-based provider tests from trying to write /etc/shadow
- p.stub!(:write_shadow_file)
+ p.stub(:write_shadow_file)
p
end
@@ -52,12 +52,12 @@ describe Chef::Provider::User::Solaris do
@new_resource.password "hocus-pocus"
# Let these tests run #write_shadow_file
- provider.unstub!(:write_shadow_file)
+ provider.unstub(:write_shadow_file)
end
it "should use its own shadow file writer to set the password" do
provider.should_receive(:write_shadow_file)
- provider.stub!(:shell_out!).and_return(true)
+ provider.stub(:shell_out!).and_return(true)
provider.manage_user
end
@@ -66,10 +66,10 @@ describe Chef::Provider::User::Solaris do
password_file.puts "adam:existingpassword:15441::::::"
password_file.close
provider.password_file = password_file.path
- provider.stub!(:shell_out!).and_return(true)
+ provider.stub(:shell_out!).and_return(true)
# may not be able to write to /etc for tests...
temp_file = Tempfile.new("shadow")
- Tempfile.stub!(:new).with("shadow", "/etc").and_return(temp_file)
+ Tempfile.stub(:new).with("shadow", "/etc").and_return(temp_file)
@new_resource.password "verysecurepassword"
provider.manage_user
::File.open(password_file.path, "r").read.should =~ /adam:verysecurepassword:/