summaryrefslogtreecommitdiff
path: root/spec/unit/config_spec.rb
diff options
context:
space:
mode:
authordanielsdeleo <dan@opscode.com>2013-05-10 12:22:23 -0700
committerdanielsdeleo <dan@opscode.com>2013-05-10 12:23:24 -0700
commitf6b8642d396e18b762721e7334f399ca90108461 (patch)
tree9822c52804dade71388072a070f54549c524c2c4 /spec/unit/config_spec.rb
parentcba4cccb2d12283f8e39a23bc92c8e925f3ec8ee (diff)
downloadchef-f6b8642d396e18b762721e7334f399ca90108461.tar.gz
[CHEF-4176] remove unneeded aliases for chef_server_url
Diffstat (limited to 'spec/unit/config_spec.rb')
-rw-r--r--spec/unit/config_spec.rb44
1 files changed, 21 insertions, 23 deletions
diff --git a/spec/unit/config_spec.rb b/spec/unit/config_spec.rb
index 270bc591e0..f35b47d50a 100644
--- a/spec/unit/config_spec.rb
+++ b/spec/unit/config_spec.rb
@@ -24,30 +24,36 @@ describe Chef::Config do
@original_env = { 'HOME' => ENV['HOME'], 'SYSTEMDRIVE' => ENV['SYSTEMDRIVE'], 'HOMEPATH' => ENV['HOMEPATH'], 'USERPROFILE' => ENV['USERPROFILE'] }
end
- shared_examples_for "server URL" do
- it "should set the search url" do
- Chef::Config.search_url.should == "https://junglist.gen.nz"
+ describe "config attribute writer: chef_server_url" do
+ before do
+ Chef::Config.chef_server_url = "https://junglist.gen.nz"
end
- it "should set the role url" do
- Chef::Config.role_url.should == "https://junglist.gen.nz"
+ it "sets the server url" do
+ Chef::Config.chef_server_url.should == "https://junglist.gen.nz"
end
- end
- describe "config attribute writer: chef_server_url" do
- before do
- Chef::Config.chef_server_url = "https://junglist.gen.nz"
+ context "when the url has a leading space" do
+ before do
+ Chef::Config.chef_server_url = " https://junglist.gen.nz"
+ end
+
+ it "strips the space from the url when setting" do
+ Chef::Config.chef_server_url.should == "https://junglist.gen.nz"
+ end
+
end
- it_behaves_like "server URL"
- end
+ context "when the url is a frozen string" do
+ before do
+ Chef::Config.chef_server_url = " https://junglist.gen.nz".freeze
+ end
- context "when the url has a leading space" do
- before do
- Chef::Config.chef_server_url = " https://junglist.gen.nz"
+ it "strips the space from the url when setting without raising an error" do
+ Chef::Config.chef_server_url.should == "https://junglist.gen.nz"
+ end
end
- it_behaves_like "server URL"
end
describe "when configuring formatters" do
@@ -94,14 +100,6 @@ describe Chef::Config do
end
- context "when the url is a frozen string" do
- before do
- Chef::Config.chef_server_url = " https://junglist.gen.nz".freeze
- end
-
- it_behaves_like "server URL"
- end
-
describe "class method: manage_secret_key" do
before do
Chef::FileCache.stub!(:load).and_return(true)