You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@buildr.apache.org by vb...@apache.org on 2008/09/21 18:47:20 UTC

svn commit: r697543 - /incubator/buildr/trunk/spec/artifact_namespace_spec.rb

Author: vborja
Date: Sun Sep 21 09:47:20 2008
New Revision: 697543

URL: http://svn.apache.org/viewvc?rev=697543&view=rev
Log:
Added spec for artifact_namespace.

Allow registering two artifacts with same spec, different name

Modified:
    incubator/buildr/trunk/spec/artifact_namespace_spec.rb

Modified: incubator/buildr/trunk/spec/artifact_namespace_spec.rb
URL: http://svn.apache.org/viewvc/incubator/buildr/trunk/spec/artifact_namespace_spec.rb?rev=697543&r1=697542&r2=697543&view=diff
==============================================================================
--- incubator/buildr/trunk/spec/artifact_namespace_spec.rb (original)
+++ incubator/buildr/trunk/spec/artifact_namespace_spec.rb Sun Sep 21 09:47:20 2008
@@ -247,6 +247,17 @@
         artifact_ns[:copied].should be_nil
       end
     end
+
+    it 'should register two artifacts with different version on namespace' do
+      define 'one' do
+        artifact_ns.use :foo => 'a:b:c:1'
+        artifact_ns.use :bar => 'a:b:c:2'
+        artifact_ns[:foo].version.should == '1'
+        artifact_ns[:bar].version.should == '2'
+        # unversioned references the last version set.
+        artifact_ns['a:b:c'].version.should == '2'
+      end
+    end
     
     it 'should complain if namespace requirement is not satisfied' do
       define 'one' do