funit 0.10.0 → 0.10.1

Sign up to get free protection for your applications and to get access to all the features.
data/History.txt CHANGED
@@ -1,6 +1,14 @@
1
+ === 0.10.0 / 2008-03-30
2
+
3
+ * 1 major enhancement
4
+ * Non-passing tests exit with non-zero exit code
5
+
6
+ * 1 minor enhancement
7
+ * --version / -V options
8
+
1
9
  === 0.10.0 / 2008-03-30 (all courtesy of Diego Virasoro)
2
10
 
3
- * 4 major enchancements
11
+ * 4 major enhancements
4
12
  * User can now use 'funit --clean' to remove the generated files
5
13
  * Source directory and test directory can be different: specify
6
14
  source dir with -s (or --source) flag
@@ -11,7 +19,7 @@
11
19
  is the name of the module to be tested
12
20
  * Multiple test suites can exist inside the same file
13
21
 
14
- * 5 minor enchancements
22
+ * 5 minor enhancements
15
23
  * Change blocks nomenclature: beginTest -> test and endTest -> end test
16
24
  (and similarly for setup and teardown)
17
25
  * Change assertions nomenclature (eg. IsEqual -> assert_equal)
data/bin/funit CHANGED
@@ -13,9 +13,10 @@ include Funit
13
13
  prog_source_dir = nil
14
14
 
15
15
  opts = GetoptLong.new(
16
- ['--help', '-h', GetoptLong::NO_ARGUMENT],
17
- ['--clean', '-c', GetoptLong::NO_ARGUMENT],
18
- ['--source', '-s', GetoptLong::REQUIRED_ARGUMENT]
16
+ ['--help', '-h', GetoptLong::NO_ARGUMENT],
17
+ ['--clean', '-c', GetoptLong::NO_ARGUMENT],
18
+ ['--version', '-V', GetoptLong::NO_ARGUMENT],
19
+ ['--source', '-s', GetoptLong::REQUIRED_ARGUMENT]
19
20
  )
20
21
 
21
22
  opts.each do |opt,arg|
@@ -24,6 +25,9 @@ opts.each do |opt,arg|
24
25
  when '--help'
25
26
  Funit::print_help
26
27
  exit
28
+ when '--version'
29
+ puts Funit::VERSION
30
+ exit
27
31
  when '--clean'
28
32
  Funit::clean_genFiles
29
33
  exit
@@ -40,6 +40,8 @@ module Funit
40
40
  <% end -%>
41
41
  write(*,*)
42
42
 
43
+ if ( sum(numFailures) /= 0 ) stop 1
44
+
43
45
  end program TestRunner
44
46
  }.gsub(/^ /,''), nil, '-' ) # turn off newlines for <% -%>
45
47
 
data/lib/funit.rb CHANGED
@@ -14,7 +14,7 @@ require 'fileutils'
14
14
 
15
15
  module Funit
16
16
 
17
- VERSION = '0.10.0'
17
+ VERSION = '0.10.1'
18
18
 
19
19
  ##
20
20
  # run all tests
@@ -34,7 +34,7 @@ module Funit
34
34
  }
35
35
  }
36
36
  compile_tests(test_suites,prog_source_dir)
37
- raise "TestRunner failed to execute." unless system "env PATH='.' TestRunner"
37
+ exit 1 unless system "env PATH='.' TestRunner"
38
38
  end
39
39
 
40
40
  ##
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: funit
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.0
4
+ version: 0.10.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Karen Bibb