Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Rake task for running tests

  • Loading branch information...
commit 4c0e6ee9e1330fda3dd4aaf4af663d2f1d16b8ff 1 parent 94031ad
@santana authored
Showing with 8 additions and 31 deletions.
  1. +8 −31 Rakefile
View
39 Rakefile
@@ -1,34 +1,11 @@
-require 'rubygems'
require 'rake'
-require 'rake/gempackagetask'
-PKG_NAME = 'ruby-informix'
-PKG_VERSION = '0.7.3'
-PKG_FILES = %w{ext/informixc.ec lib/informix.rb} + Dir["lib/informix/*"] +
- Dir["test/*rb"] + %w{COPYRIGHT Changelog README}
-
-spec = Gem::Specification.new do |s|
- s.name = PKG_NAME
- s.version = PKG_VERSION
- s.summary = 'Ruby library for IBM Informix'
- s.description = 'Ruby library for connecting to IBM Informix 7 and above'
- s.files = PKG_FILES
- s.require_path = 'lib'
- s.has_rdoc = true
- s.rdoc_options << '--title' << "Ruby/Informix -- #{s.summary}" <<
- '--exclude' << 'test' << '--exclude' << 'extconf.rb' <<
- '--inline-source' << '--line-numbers' <<
- '--main' << 'README'
- s.extra_rdoc_files << 'README' << 'ext/informixc.c'
- s.author = 'Gerardo Santana Gomez Garrido'
- s.email = 'gerardo.santana@gmail.com'
- s.homepage = 'http://ruby-informix.rubyforge.org/'
- s.rubyforge_project = PKG_NAME
- s.extensions << 'ext/extconf.rb'
-end
-
-Rake::GemPackageTask.new(spec) do |p|
- p.gem_spec = spec
- p.need_tar_gz = true
- p.need_zip = true
+desc "Run tests"
+task :test, [:dbname, :user, :password] do |t, args|
+ if args.dbname.nil?
+ warn "Provide an existing database name to run the tests against"
+ exit 1
+ end
+ Dir['test/test_*rb'].each {|testfile| load testfile }
+ ARGV.replace [args.dbname, args.user, args.password]
end
Please sign in to comment.
Something went wrong with that request. Please try again.