#!/usr/bin/ruby -w
require 'test/unit'
if ARGV.include?("--test")
ARGV.delete_at(ARGV.index("--test"))
else
Test::Unit::run = true
puts "Running..."
end
Now you can simply run the program by typing
$ ./testme.rb
Running...
or run the tests with
$ ./testme.rb --test
Loaded suite ./testme
Started
Finished in 0.0 seconds.
0 tests, 0 assertions, 0 failures, 0 errors
The nice thing is that only the first "--test" will be removed, so you can still leverage the Test::Unit command line argument interface.
[...] way to tell a script that it should just execute it's unit tests and exit. See my blog post about integrating unit tests in Ruby scripts to learn how this can be done in Ruby. A very similar approach is possible for [...]
ReplyDeleteBusiness intelligence analyst
ReplyDeleteSQIAR (http://www.sqiar.com/services/bi-strategy/) is a leading Business Intelligence company.Sqiar Provide business intelligence Services Which help the company to present Information in Meaningful form.
This comment has been removed by the author.
ReplyDeletemặc dầu còn hơn 1 tháng nữa mới đến Tết Nguyên đán 2017 nhưng tại Hà Nội, đa dạng cây đào bích, đào phai đã sớm khoe sắc trên giàn phơi quần áo.
ReplyDeleteVừa mua cành đào phai tại chợ hoa lăng xê, bà Nguyễn Thị Liên (51 tuổi, P.Bạch Mai, Q.Hai Bà Trưng) chia sẻ: “Tôi mua cành đào phai giá 160.000 đồng. Năm nào vợ chồng tôi cũng đánh xe lên chợ này tậu cành đào về đón rằm tháng Chạp và Tết Dương lịch”.
The most essential thing that one must know is the thing that sort of a content he or she is searching for and afterward begins the scan for one that has those highlights that one is searching for. It is basic not to change the necessity once you choose for one. screenplay analysis
ReplyDelete