-
Notifications
You must be signed in to change notification settings - Fork 122
Expand file tree
/
Copy pathcheck_test.rb
More file actions
23 lines (20 loc) · 804 Bytes
/
check_test.rb
File metadata and controls
23 lines (20 loc) · 804 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
require File.expand_path "../test_helper", __FILE__
context "scribe check tests" do
setup do
@scribe = GitScribe.new
end
test "scribe can check for programs it needs" do
status = @scribe.check
assert_equal status.size, 6
end
# there no option '-failboat' 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 -version'), true
assert_equal @scribe.check_can_run('fop -failboat'), false
end
end