buildr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From boisv...@apache.org
Subject svn commit: r917222 - /buildr/trunk/spec/packaging/artifact_namespace_spec.rb
Date Sun, 28 Feb 2010 17:44:46 GMT
Author: boisvert
Date: Sun Feb 28 17:44:46 2010
New Revision: 917222

URL: http://svn.apache.org/viewvc?rev=917222&view=rev
Log:
Another spec for BUILDR-233

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

Modified: buildr/trunk/spec/packaging/artifact_namespace_spec.rb
URL: http://svn.apache.org/viewvc/buildr/trunk/spec/packaging/artifact_namespace_spec.rb?rev=917222&r1=917221&r2=917222&view=diff
==============================================================================
--- buildr/trunk/spec/packaging/artifact_namespace_spec.rb (original)
+++ buildr/trunk/spec/packaging/artifact_namespace_spec.rb Sun Feb 28 17:44:46 2010
@@ -308,7 +308,6 @@
       foo.use :bar => '2.0'
       foo.bar.version.should == '2.0'
     end
-
   end
 
   describe '#values' do
@@ -525,21 +524,31 @@
 
 end # ArtifactNamespace
 
-describe Buildr::ArtifactNamespace do
+describe Buildr::ArtifactNamespace::ArtifactRequirement do
+  before(:each) { Buildr::ArtifactNamespace.clear }
   it 'should be created from artifact_ns' do
     foo = artifact_ns do |ns|
-      ns.bar = 'a:b:jar:1.0'
+      ns.bar = 'a:b:c:1.0'
     end
     foo.bar.should be_kind_of(ArtifactNamespace::ArtifactRequirement)
   end
 
   it 'should handle version as string' do
     foo = artifact_ns do |ns|
-      ns.bar = 'a:b:jar:1.0'
+      ns.bar = 'a:b:c:1.0'
     end
     foo.bar.version = '2.0'
     foo.bar.version.should == '2.0'
   end
+
+  it 'should handle version string directly' do
+    foo = artifact_ns do |ns|
+      ns.bar = 'a:b:c:1.0'
+    end
+    foo.bar = '2.0'
+    foo.bar.version.should == '2.0'
+  end
+
 end # ArtifactRequirement
 
 describe Buildr do



Mime
View raw message