You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@whimsical.apache.org by ru...@apache.org on 2016/06/10 14:59:29 UTC
[whimsy] 01/04: get one test passing again
This is an automated email from the ASF dual-hosted git repository.
rubys pushed a commit to branch master
in repository https://git-dual.apache.org/repos/asf/whimsy.git
commit 5924a8e866420f905f72a5c13dbecc9724526361
Author: Sam Ruby <ru...@intertwingly.net>
AuthorDate: Fri Jun 10 06:34:46 2016 -0400
get one test passing again
---
lib/whimsy/asf/svn.rb | 3 ++-
www/board/agenda/spec/secretary_spec.rb | 1 +
www/board/agenda/spec/spec_helper.rb | 5 +++--
3 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/lib/whimsy/asf/svn.rb b/lib/whimsy/asf/svn.rb
index 28996db..5375830 100644
--- a/lib/whimsy/asf/svn.rb
+++ b/lib/whimsy/asf/svn.rb
@@ -139,6 +139,7 @@ module ASF
# updating a new file
previous_contents = nil
contents = yield tmpdir, ''
+ previous_contents = File.read(tmpfile) if File.file? tmpfile
end
# create/update the temporary copy
@@ -167,7 +168,7 @@ module ASF
end
# fail if there are pending changes
- unless rc == 0 and `svn st`.empty?
+ unless rc == 0 and `svn st #{tmpfile || tmpdir}`.empty?
raise "svn failure #{path.inspect}"
end
ensure
diff --git a/www/board/agenda/spec/secretary_spec.rb b/www/board/agenda/spec/secretary_spec.rb
index 57ca350..3484ba9 100644
--- a/www/board/agenda/spec/secretary_spec.rb
+++ b/www/board/agenda/spec/secretary_spec.rb
@@ -94,6 +94,7 @@ feature 'report' do
begin
eval(File.read('views/actions/draft.json.rb'), nil, 'draft.json.rb')
+ system 'svn', 'update', file
expect(File.exist? file).to be true
expect(File.read file).to eq draft
ensure
diff --git a/www/board/agenda/spec/spec_helper.rb b/www/board/agenda/spec/spec_helper.rb
index 78b9a51..15c867d 100644
--- a/www/board/agenda/spec/spec_helper.rb
+++ b/www/board/agenda/spec/spec_helper.rb
@@ -50,9 +50,10 @@ module MockServer
# intercept commits, adding the files to the cleanup list
def system(*args)
args.flatten!
- if args[1] == 'commit'
- @cleanup <<= args[2] if @cleanup
+ if args[1] == 'commit' and @cleanup
+ @cleanup <<= args[2]
else
+ args.reject! {|arg| Array === arg}
@transcript ||= ''
@transcript += `#{Shellwords.join(args)}`
end
--
To stop receiving notification emails like this one, please contact
"commits@whimsical.apache.org" <co...@whimsical.apache.org>.