diff options
| author | Randy Morgan <[email protected]> | 2012-09-30 09:07:52 +0900 |
|---|---|---|
| committer | Randy Morgan <[email protected]> | 2012-09-30 09:07:52 +0900 |
| commit | 6dcc340012ed98086aa346eb3737db0804ebdefd (patch) | |
| tree | cd0a34d9d15f1c850cfc325453263306c15350d3 /test/util/tc_validators.rb | |
| parent | 7d7650287ca27c599f62895ba0d84a8339ed9da1 (diff) | |
| download | caxlsx-6dcc340012ed98086aa346eb3737db0804ebdefd.tar.gz caxlsx-6dcc340012ed98086aa346eb3737db0804ebdefd.zip | |
Added validation spec for Range validator
Diffstat (limited to 'test/util/tc_validators.rb')
| -rw-r--r-- | test/util/tc_validators.rb | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/test/util/tc_validators.rb b/test/util/tc_validators.rb index 4de13ec3..1c3e173c 100644 --- a/test/util/tc_validators.rb +++ b/test/util/tc_validators.rb @@ -158,4 +158,11 @@ class TestValidators < Test::Unit::TestCase assert_raise(ArgumentError) { Axlsx.validate_split_state_type 'frozen_split' } assert_raise(ArgumentError) { Axlsx.validate_split_state_type 0 } end -end
\ No newline at end of file + + def test_range_validation + # exclusive + assert_raise(ArgumentError) { Axlsx::RangeValidator.validate('foo', 1, 10, 10, false) } + # inclusive by default + assert_nothing_raised { Axlsx::RangeValidator.validate('foo', 1, 10, 10) } + end +end |
