Skip to content

Commit

Permalink
playing test unit
Browse files Browse the repository at this point in the history
  • Loading branch information
netbe committed Apr 18, 2012
1 parent 1d837d9 commit f5abf2f
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 4 deletions.
9 changes: 5 additions & 4 deletions convert.rb
Expand Up @@ -155,14 +155,15 @@ def self.csv_to_dotstrings(name)
end
end

# Part of the script
if $0 == __FILE__
# Shows help on how to use this script

def usage
RDoc::usage
exit
end
# Part of the script
if $0 == __FILE__
# Shows help on how to use this script



# Main program
if ARGV.size < 1
Expand Down
24 changes: 24 additions & 0 deletions test_convert.rb
@@ -0,0 +1,24 @@
# == Synopsis
# tesing script
begin
require "test/unit"
rescue Exception => e
puts "gem install test-unit"
exit
end
$: << File.expand_path(File.join(File.dirname(__FILE__)))

require 'convert'
# require File.expand_path('convert',File.dirname(__FILE__))

class TestConvert < Test::Unit::TestCase

def test_usage
begin
usage
rescue SystemExit => e
assert e.status == 0
end
end

end

0 comments on commit f5abf2f

Please sign in to comment.