Remove the package created via filter in the same block that creates it. Thus 
it does not matter what order the blocks execute in

git-svn-id: https://svn.apache.org/repos/asf/buildr/trunk@1537926 
13f79535-47bb-0310-9956-ffa450edef68


Project: http://git-wip-us.apache.org/repos/asf/buildr/repo
Commit: http://git-wip-us.apache.org/repos/asf/buildr/commit/ec23c537
Tree: http://git-wip-us.apache.org/repos/asf/buildr/tree/ec23c537
Diff: http://git-wip-us.apache.org/repos/asf/buildr/diff/ec23c537

Branch: refs/heads/master
Commit: ec23c53771ce6015e55ba7433b5f96211e4b0972
Parents: 06b5957
Author: Peter Donald <[email protected]>
Authored: Fri Nov 1 13:11:58 2013 +0000
Committer: Peter Donald <[email protected]>
Committed: Fri Nov 1 13:11:58 2013 +0000

----------------------------------------------------------------------
 spec/java/packaging_spec.rb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/buildr/blob/ec23c537/spec/java/packaging_spec.rb
----------------------------------------------------------------------
diff --git a/spec/java/packaging_spec.rb b/spec/java/packaging_spec.rb
index 2d2e9c8..6bc50d2 100644
--- a/spec/java/packaging_spec.rb
+++ b/spec/java/packaging_spec.rb
@@ -564,12 +564,12 @@ describe Packaging, 'war' do
     Zip::ZipFile.open(project('foo').package(:war).to_s) do |war|
       war.get_input_stream('test.html').read.should eql('999')
     end
+    rm_f project('foo').package(:war).to_s
   end
 
   it 'should accept files from :classes option', :retry => 
(Buildr::Util.win_os? ? 4 : 1) do
     write 'classes/test'
     define('foo', :version=>'1.0') { package(:war).with(:classes=>'classes') }
-    rm_f project('foo').package(:war).to_s
     inspect_war { |files| files.should include('WEB-INF/classes/test') }
   end
 

Reply via email to