Object
# File lib/rspec/matchers/built_in/be_within.rb, line 33 33: def description 34: "be within #{delta} of #{expected}" 35: end
# File lib/rspec/matchers/built_in/be_within.rb, line 25 25: def failure_message_for_should 26: "expected #{actual} to #{description}" 27: end
# File lib/rspec/matchers/built_in/be_within.rb, line 29 29: def failure_message_for_should_not 30: "expected #{actual} not to #{description}" 31: end
# File lib/rspec/matchers/built_in/be_within.rb, line 13 13: def matches?(actual) 14: unless defined?(@expected) 15: raise ArgumentError.new("You must set an expected value using #of: be_within(#{delta}).of(expected_value)") 16: end 17: (super(actual) - expected).abs <= delta 18: end
Disabled; run with --debug to generate this.
Generated with the Darkfish Rdoc Generator 1.1.6.