You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@buildr.apache.org by as...@apache.org on 2008/04/12 03:37:29 UTC

svn commit: r647363 - /incubator/buildr/trunk/spec/archive_spec.rb

Author: assaf
Date: Fri Apr 11 18:37:12 2008
New Revision: 647363

URL: http://svn.apache.org/viewvc?rev=647363&view=rev
Log:
Checking that file tasks are indeed invokes and included in Zip.

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

Modified: incubator/buildr/trunk/spec/archive_spec.rb
URL: http://svn.apache.org/viewvc/incubator/buildr/trunk/spec/archive_spec.rb?rev=647363&r1=647362&r2=647363&view=diff
==============================================================================
--- incubator/buildr/trunk/spec/archive_spec.rb (original)
+++ incubator/buildr/trunk/spec/archive_spec.rb Fri Apr 11 18:37:12 2008
@@ -71,6 +71,19 @@
     inspect_archive.size.should eql(@files.size)
   end
 
+  it 'should archive file tasks' do
+    tasks = @files.map { |fn| file(fn) }
+    archive(@archive).include(tasks).invoke
+    inspect_archive { |archive| @files.each { |f| archive[File.basename(f)].should eql(content_for(f)) } }
+    inspect_archive.size.should eql(@files.size)
+  end
+
+  it 'should invoke and archive file tasks' do
+    file = file('included') { write 'included' }
+    lambda { archive(@archive).include(file).invoke }.should change { File.exist?(file.to_s) }.to(true)
+    inspect_archive.should include('included')
+  end
+
   it 'should include entry for directory' do
     archive(@archive).include(@dir).invoke
     inspect_archive { |archive| @files.each { |f| archive['test/' + File.basename(f)].should eql(content_for(f)) } }