Add Logical Or example to RSpec (#1554)
Co-authored-by: Rico Sta. Cruz <rstacruz@users.noreply.github.com>
This commit is contained in:
parent
cd27a164b3
commit
1c43d9feb4
8
rspec.md
8
rspec.md
|
@ -79,6 +79,14 @@ expect(5).to be_between(1, 10)
|
|||
expect(5).to be_within(0.05).of value
|
||||
```
|
||||
|
||||
### Compound expectations
|
||||
|
||||
```rb
|
||||
expect(1).to (be < 2).or be > 5
|
||||
```
|
||||
|
||||
Use `or`/`and` to string multiple matchers together. See: [Compound expectations](https://relishapp.com/rspec/rspec-expectations/docs/compound-expectations)
|
||||
|
||||
### Comparison
|
||||
|
||||
```rb
|
||||
|
|
Loading…
Reference in New Issue