diff --git a/spec/models/kalibro_range_spec.rb b/spec/models/kalibro_range_spec.rb index 06179f4..8ba1317 100644 --- a/spec/models/kalibro_range_spec.rb +++ b/spec/models/kalibro_range_spec.rb @@ -69,6 +69,16 @@ expect(subject.as_json['end']).to eq('INF') end end + + context 'with negative infinity end' do + before do + subject.end = -Float::INFINITY + end + + it 'is expected to convert to INF' do + expect(subject.as_json['end']).to eq('-INF') + end + end end end diff --git a/spec/rails_helper.rb b/spec/rails_helper.rb index fb16b33..776b8b3 100644 --- a/spec/rails_helper.rb +++ b/spec/rails_helper.rb @@ -5,7 +5,7 @@ # Minimum coverage is only desired on CI tools when building the environment. CI is a # default environment variable used by Travis. For reference, see here: # https://docs.travis-ci.com/user/environment-variables/#Default-Environment-Variables - minimum_coverage 100 if ENV["CI"] == 'true' + minimum_coverage 100 if ENV['CI'] == 'true' coverage_dir 'coverage/rspec' add_filter '/spec/'