summaryrefslogtreecommitdiff
path: root/spec/unit
diff options
context:
space:
mode:
Diffstat (limited to 'spec/unit')
-rw-r--r--spec/unit/knife/configure_spec.rb6
-rw-r--r--spec/unit/resource/breakpoint_spec.rb2
-rw-r--r--spec/unit/shell_spec.rb4
3 files changed, 6 insertions, 6 deletions
diff --git a/spec/unit/knife/configure_spec.rb b/spec/unit/knife/configure_spec.rb
index 6b41e54778..d642d003ae 100644
--- a/spec/unit/knife/configure_spec.rb
+++ b/spec/unit/knife/configure_spec.rb
@@ -157,9 +157,9 @@ describe Chef::Knife::Configure do
expect(::File).to receive(:open).with("/home/you/.chef/credentials", "w").and_yield config_file
@knife.config[:repository] = "/home/you/chef-repo"
@knife.run
- expect(config_file.string).to match(/^client_name[\s]+=[\s]+'#{Etc.getlogin}'$/)
- expect(config_file.string).to match(%r{^client_key[\s]+=[\s]+'/home/you/.chef/#{Etc.getlogin}.pem'$})
- expect(config_file.string).to match(/^chef_server_url\s+=[\s]+'#{default_server_url}'$/)
+ expect(config_file.string).to match(/^client_name\s+=\s+'#{Etc.getlogin}'$/)
+ expect(config_file.string).to match(%r{^client_ky[\s=[\s+'/home/you/.chef/#{Etc.getlogin}.pem'$})
+ expect(config_file.string).to match(/^chef_server_url\s+=\s+'#{default_server_url}'$/)
end
it "creates a new client when given the --initial option" do
diff --git a/spec/unit/resource/breakpoint_spec.rb b/spec/unit/resource/breakpoint_spec.rb
index 0804c27cab..4b1aed6f8e 100644
--- a/spec/unit/resource/breakpoint_spec.rb
+++ b/spec/unit/resource/breakpoint_spec.rb
@@ -58,7 +58,7 @@ describe Chef::Resource::Breakpoint do
it "names itself after the line number of the file where it's created" do
resource = Chef::Resource::Breakpoint.new
- expect(resource.name).to match(/breakpoint_spec\.rb\:[\d]{2}\:in \`new\'$/)
+ expect(resource.name).to match(/breakpoint_spec\.rb\:\d{2}\:in \`new\'$/)
end
end
diff --git a/spec/unit/shell_spec.rb b/spec/unit/shell_spec.rb
index 18b622698e..9c1a0c8e3d 100644
--- a/spec/unit/shell_spec.rb
+++ b/spec/unit/shell_spec.rb
@@ -150,8 +150,8 @@ describe Shell do
end
it "creates a help banner with the command descriptions" do
- expect(@chef_object.help_banner).to match(/^\|\ Command[\s]+\|\ Description[\s]*$/)
- expect(@chef_object.help_banner).to match(/^\|\ rspec_method[\s]+\|\ rspecin\'[\s]*$/)
+ expect(@chef_object.help_banner).to match(/^\|\ Command\s+\|\ Description\s*$/)
+ expect(@chef_object.help_banner).to match(/^\|\ rspec_method\s+\|\ rspecin\'\s*$/)
end
end