Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
executable file 51 lines (40 sloc) 1.1 KB
#!/usr/bin/env ruby
require 'test/unit'
class TC_MyTest < Test::Unit::TestCase
# def setup
# end
# def teardown
# end
def test_all
puts "\nTest everything except 'timestamp', 'punch_in', and 'transfer')"
puts "Server: "
puts "( by default)"
server = gets.chomp
server = '' if server.empty?
puts "User: "
user = gets.chomp
puts "Passphrase: "
puts "(your passphrase will not be shadowed, you will see it as you type)"
token = gets.chomp
puts "Transfer: "
puts "(okay to leave blank)"
job = gets.chomp
require 'kronos.rb'
kronos = server
assert !kronos.authenticated
assert kronos.authenticate user, token
assert kronos.authenticated
assert kronos.punches
if kronos.punched_in
assert kronos.punched_in
assert !kronos.punched_out
assert !kronos.punch_in
assert !kronos.punched_in
assert kronos.punched_out
assert !kronos.punch_out
require 'test/unit/ui/console/testrunner'
Jump to Line
Something went wrong with that request. Please try again.