diff options
author | Claire McQuin <mcquin@users.noreply.github.com> | 2014-06-09 14:47:56 -0700 |
---|---|---|
committer | Claire McQuin <mcquin@users.noreply.github.com> | 2014-06-09 14:47:56 -0700 |
commit | 143f1b34a506bc95a002f52932c0686eb94ac727 (patch) | |
tree | 7ca5b6e04a5bf664997d36877fcc5c6511dc8fdb /spec/unit/environment_spec.rb | |
parent | 460a4189164ce693bc35608f7563dc770c543b1b (diff) | |
parent | 8bb2677db528ad0a74faa439decf4321260d5b53 (diff) | |
download | chef-143f1b34a506bc95a002f52932c0686eb94ac727.tar.gz |
Merge pull request #848 from onddo/CHEF-4298
[CHEF-4298] dependencies in metadata.rb require a space
Diffstat (limited to 'spec/unit/environment_spec.rb')
-rw-r--r-- | spec/unit/environment_spec.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/spec/unit/environment_spec.rb b/spec/unit/environment_spec.rb index ebbcdd9861..0e230e46ed 100644 --- a/spec/unit/environment_spec.rb +++ b/spec/unit/environment_spec.rb @@ -263,7 +263,9 @@ describe Chef::Environment do describe "self.validate_cookbook_version" do it "should validate correct version numbers" do Chef::Environment.validate_cookbook_version("= 1.2.3").should == true + Chef::Environment.validate_cookbook_version("=1.2.3").should == true Chef::Environment.validate_cookbook_version(">= 0.0.3").should == true + Chef::Environment.validate_cookbook_version(">=0.0.3").should == true # A lone version is allowed, interpreted as implicit '=' Chef::Environment.validate_cookbook_version("1.2.3").should == true end @@ -271,9 +273,13 @@ describe Chef::Environment do it "should return false when an invalid version is given" do Chef::Environment.validate_cookbook_version(Chef::CookbookVersion.new("meta")).should == false Chef::Environment.validate_cookbook_version("= 1.2.3a").should == false + Chef::Environment.validate_cookbook_version("=1.2.3a").should == false Chef::Environment.validate_cookbook_version("= 1").should == false + Chef::Environment.validate_cookbook_version("=1").should == false Chef::Environment.validate_cookbook_version("= a").should == false + Chef::Environment.validate_cookbook_version("=a").should == false Chef::Environment.validate_cookbook_version("= 1.2.3.4").should == false + Chef::Environment.validate_cookbook_version("=1.2.3.4").should == false end describe "in solo mode" do |