buildr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From boisv...@apache.org
Subject svn commit: r1067966 - /buildr/trunk/spec/java/packaging_spec.rb
Date Mon, 07 Feb 2011 15:26:14 GMT
Author: boisvert
Date: Mon Feb  7 15:26:14 2011
New Revision: 1067966

URL: http://svn.apache.org/viewvc?rev=1067966&view=rev
Log:
Fix javadoc packaging spec

Modified:
    buildr/trunk/spec/java/packaging_spec.rb

Modified: buildr/trunk/spec/java/packaging_spec.rb
URL: http://svn.apache.org/viewvc/buildr/trunk/spec/java/packaging_spec.rb?rev=1067966&r1=1067965&r2=1067966&view=diff
==============================================================================
--- buildr/trunk/spec/java/packaging_spec.rb (original)
+++ buildr/trunk/spec/java/packaging_spec.rb Mon Feb  7 15:26:14 2011
@@ -1169,16 +1169,15 @@ describe Packaging, 'sources' do
   end
 end
 
-
 describe Packaging, 'javadoc' do
   it_should_behave_like 'packaging'
-  before { @packaging, @package_type = :javadoc, :zip }
+  before { @packaging, @package_type = :javadoc, :jar }
 
   it 'should create package of type :zip and classifier \'javadoc\'' do
     define 'foo', :version=>'1.0' do
-      package(:javadoc).type.should eql(:zip)
+      package(:javadoc).type.should eql(:jar)
       package(:javadoc).classifier.should eql('javadoc')
-      package(:javadoc).name.pathmap('%f').should eql('foo-1.0-javadoc.zip')
+      package(:javadoc).name.pathmap('%f').should eql('foo-1.0-javadoc.jar')
     end
   end
 
@@ -1204,7 +1203,6 @@ describe Packaging, 'javadoc' do
   end
 end
 
-
 shared_examples_for 'package_with_' do
 
   def prepare(options = {})
@@ -1223,9 +1221,7 @@ shared_examples_for 'package_with_' do
 
   it 'should create package of the right packaging with classifier' do
     prepare
-    ext = "zip"
-    ext = "jar" if @packaging == :sources
-    project('foo').packages.first.to_s.should =~ /foo-1.0-#{@packaging}.#{ext}/
+    project('foo').packages.first.to_s.should =~ /foo-1.0-#{@packaging}.#{@ext}/
   end
 
   it 'should create package for projects that have source files' do
@@ -1261,10 +1257,10 @@ end
 
 describe 'package_with_sources' do
   it_should_behave_like 'package_with_'
-  before { @packaging = :sources }
+  before { @packaging, @ext = :sources, 'jar' }
 end
 
 describe 'package_with_javadoc' do
   it_should_behave_like 'package_with_'
-  before { @packaging = :javadoc }
+  before { @packaging, @ext = :javadoc, 'jar' }
 end



Mime
View raw message