http://cheat.errtheblog.com/s/rspec/ has for inequalities (such as less than or greater than)
target.should be < 6
Has anything better been created since the cheat sheet was created?
In RSpec's new expectation syntax, you would express it as:
expect(target).to be < 6
This is still the accepted way to handle this test. It's best to use >, <, and == in my opinion for numerical comparisons -- it's clearer.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With