Sha256: c7a752d228706c99441d4c1227ea4388f22fcdce48e057a0fbc3a80c5796a28e
Contents?: true
Size: 725 Bytes
Versions: 3
Compression:
Stored size: 725 Bytes
Contents
require 'mida/datatype' describe Mida::DataType::Integer do it '#extract should raise an exception if not a number' do test = lambda {Mida::DataType::Integer.extract('hello')} test.should raise_error(ArgumentError) end it '#extract should raise an exception if value is empty' do test = lambda {Mida::DataType::Integer.extract('')} test.should raise_error(ArgumentError) end it '#extract? should raise an exception if a floating point number' do test = lambda {Mida::DataType::Integer.extract('3.14')} test.should raise_error(ArgumentError) end it '#extract? should return the input value as a Integer if a integer' do Mida::DataType::Integer.extract("3").should == 3 end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
mida-0.3.2 | spec/datatype/integer_spec.rb |
mida-0.3.1 | spec/datatype/integer_spec.rb |
mida-0.3.0 | spec/datatype/integer_spec.rb |