Sha256: 5d0ececd221c37a298d6b8b9755d4112142f189a14f9dd8da6d52abe1dacd066
Contents?: true
Size: 587 Bytes
Versions: 1
Compression:
Stored size: 587 Bytes
Contents
require 'test_helper' require File.join(File.dirname(__FILE__), '..', '..', 'lib/cliutils/prefs/pref_validators/time_validator') # Tests for the Configurator class class TestTimeValidator < Test::Unit::TestCase def test_valid v = CLIUtils::TimeValidator.new v.validate('12:43 AM') assert_equal(v.is_valid, true) assert_equal(v.message, 'Response is not a time: 12:43 AM') end def test_invalid v = CLIUtils::TimeValidator.new v.validate('bzzzp') assert_equal(v.is_valid, false) assert_equal(v.message, 'Response is not a time: bzzzp') end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
cliutils-2.1.2 | test/validator_tests/time_validator_test.rb |