Sha256: 839f61bd589b281bdc1e326df4816c26e478b9e2d75c1a98bc9ad76c2af87e7e
Contents?: true
Size: 979 Bytes
Versions: 17
Compression:
Stored size: 979 Bytes
Contents
require 'spec_helper' describe RSpecCandy do describe 'matchers' do describe 'be_same_number_as' do it 'should correctly compare Fixnums and Floats' do 1.should be_same_number_as(1.0) 2.should_not be_same_number_as(1.0) -1.should be_same_number_as(-1.0) -2.should_not be_same_number_as(-1.0) end it 'should correctly compare Fixnums and BigDecimals' do 1.should be_same_number_as(BigDecimal('1.0')) 2.should_not be_same_number_as(BigDecimal('1.0')) -1.should be_same_number_as(BigDecimal('-1.0')) -2.should_not be_same_number_as(BigDecimal('-1.0')) end it 'should correctly compare Floats and BigDecimals' do 1.1.should be_same_number_as(BigDecimal('1.1')) 2.1.should_not be_same_number_as(BigDecimal('1.1')) -1.1.should be_same_number_as(BigDecimal('-1.1')) -2.1.should_not be_same_number_as(BigDecimal('-1.1')) end end end end
Version data entries
17 entries across 17 versions & 1 rubygems