Passes if actual == expected +/- delta
expect(result).to be_within(0.5).of(3.0) expect(result).not_to be_within(0.5).of(3.0)
405 406 407
# File 'lib/rspec/matchers.rb', line 405 def be_within(delta) BuiltIn::BeWithin.new(delta) end