forked from rspec/rspec-expectations
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change the be_within matcher to be inclusive of the delta.
- Fixes rspec#131. - This changes the way the matcher behaves, which is something we would generally avoid in anything but a major release, however we believe that this is the correct behavior and that this change is very unlikely to impact anybody negatively. Specifically: 1. 17.4.should be_within(0.5).of(17) # used to pass and continues to pass 2. 17.5.should be_within(0.5).of(17) # used to fail due to lack of inclusivity, but passes after this change 3. 17.6.should be_within(0.5).of(17) # used to fail and continues to fail 4. 17.4.should_not be_within(0.5).of(17) # used to fail and continues to fail 5. 17.5.should_not be_within(0.5).of(17) # used to pass due to lack of inclusivity, but fails after this change 6. 17.6.should_not be_within(0.5).of(17) # used to fail and continues to fail Scenario 2 used to fail, so it's unlikely to be present. Scenario 5 will result in new failures, but we believe that it is very unlikely to be used.
- Loading branch information
1 parent
ca5cc09
commit a9bf7ab
Showing
4 changed files
with
20 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters