Skip to content
Browse files

Merge remote branch 'origin/master'

  • Loading branch information...
2 parents aeceff6 + 7a8a1f2 commit 6641024ce3ffd5873a5358f306c8758d9cbbcef9 @schacon schacon committed Apr 27, 2011
Showing with 12 additions and 1 deletion.
  1. +1 −1 lib/git-scribe/check.rb
  2. +11 −0 test/check_test.rb
View
2 lib/git-scribe/check.rb
@@ -42,7 +42,7 @@ def check(args = [])
# check for fop
- if !check_can_run('fop -version')
+ if !check_can_run('fop -v -out list')
info "fop is not present, please install for PDF generation"
status[:fop] = false
else
View
11 test/check_test.rb
@@ -9,4 +9,15 @@
status = @scribe.check
assert_equal status.size, 6
end
+
+ # there no option '-version' for apache fop cli
+ # it accepts only '-v' option but doesn't exit immediately.
+ # it should be additional no-op flag provided (like '-out list')
+ #
+ # see http://svn.apache.org/repos/asf/xmlgraphics/fop/trunk/src/java/org/apache/fop/cli/CommandLineOptions.java
+ test "scribe should correctly check fop availability" do
+ assert_equal @scribe.check_can_run('fop -v -out list'), true
+ assert_equal @scribe.check_can_run('fop -v'), false
+ assert_equal @scribe.check_can_run('fop -version'), false
+ end
end

0 comments on commit 6641024

Please sign in to comment.
Something went wrong with that request. Please try again.